General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 20th, 2003, 12:50 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
change user date to db date

alright... I was wondering...
is it possible that a user enter a date and then have a page check that date against the current time, and perform an action if that time has past?
I need to let a user add a time in the future, and then check it against the current date. This may be a dumb question, but I can't figure it out since the users entry is not going to be a timestamp or anything, since that would be jsut a current time... how can I do this?
thanks!
__________________
hey it's the CHARKING

Reply With Quote
  #2  
Old August 20th, 2003, 06:44 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You haven't described your problem very clearly. Is it a date or a time we're dealing with here (or both)? If you validate the user input properly (using select boxes rather than text entry, for example), you should be able to compare both the date and time against substrings of the system time. Check out the DATE_FORMAT() function in mysql (for pulling out formatted date and time strings from date/time fields, the FROM_UNIXTIME() function (also in mysql) and the mktime() and date() functions in PHP.

Reply With Quote
  #3  
Old August 20th, 2003, 12:21 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
sorry

okay I jsut realized that date works. Sorry I didn't explain myself clearly eniough. Thank you very much!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > change user date to db date


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway