Date format in public update field
5 posts by 3 authors in: Forums > CMS Builder
Last Post: January 27, 2010 (RSS)
By InHouse - January 22, 2010
We'd like to post a front-end page on several sites which allow users to post event info to the CMS for moderation and approval. Have most of the needed parts in place but would like some guidance on date fields.
Can you suggest a best practices method to expose date fields in our form, then validate that and massage it into shape for inclusion in a CMSB article? I think strtotime() is the way the backend manages things but I'd like to hear from the experts.
Am considering some jQuery calendar options and would welcome suggestions in that direction also (as a noob jQuery user).
Many thanks,
J.
Re: [InHouse] Date format in public update field
By Chris - January 25, 2010 - edited: January 25, 2010
Can you send me what you've got already?
EDIT: now I have coffee.
Chris
Re: [chris] Date format in public update field
By InHouse - January 26, 2010
Will post what I come up shortly.
J.
Re: [InHouse] Date format in public update field
By Dave - January 27, 2010
The key thing is that when you INSERT or UPDATE a record in MySQL the date is in this format: YYYY-MM-DD HH:MM:SS
You can see some sample code here for generating date fields:
http://www.interactivetools.com/forum/gforum.cgi?post=75404#75404
Let me know how far you get with that and any additional questions you might have.
Hope that helps!
interactivetools.com
Re: [Dave] Date format in public update field
By InHouse - January 27, 2010
J.