Part of the EllisLab Network
   
 
Code to convert human dates from form to Unix time stamp
Posted: 20 June 2009 07:27 PM   [ Ignore ]  
Summer Student
Total Posts:  14
Joined  06-10-2009

Needed is a solution to take human date input from a web page form and convert it to a UNIX timestamp.

The application stores all date/time data in the database as a UNIX timestamp using the PHP functions, ie time() with the intent of making the code more portable for differing databases-read engineering Oracle out of the equation.  The human input will be only mm/dd/yyyy (no hours min etc.) or some iteration of that depending on further reasearch, but still must be stored in the db as a Unix timestamp. The human inputted timestamps need to be searchable in day increments and human backdating and postdating will be allowed.

Questions:
1.  Can/how does one use the human_to_unix() function for such a requirement?
2.  Are there other approaches that would work better?

Thanks,

Ed

Profile
 
 
Posted: 20 June 2009 07:32 PM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2690
Joined  05-18-2008

Ummm… What is this doing in the wiki section?

 Signature 

I’m building a Project Management System for my 3rd year Uni project, Sign up to the beta
Track my progress | Post of the day: UI Designs
Get full auto complete support for CodeIgniter in Eclipse

Profile
 
 
Posted: 20 June 2009 07:55 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  14
Joined  06-10-2009

Sorry about that.  Did not realize I was in the Wiki section.  I have posted it the general section Please disregarde this post.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120482 Total Logged-in Users: 28
Total Topics: 126558 Total Anonymous Users: 2
Total Replies: 665407 Total Guests: 297
Total Posts: 791965    
Members ( View Memberlist )