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

Hi all,

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

Hi J,

Can you send me what you've got already?

EDIT: now I have coffee.
All the best,
Chris

Re: [chris] Date format in public update field

By InHouse - January 26, 2010

Thanks again Chris. The problem is that I have nothing to show right now. But I will soon. Was hoping to get a steer in the right direction before I went merrily off down the garden path... only to become hopelessly lost in the begonias.

Will post what I come up shortly.

J.

Re: [InHouse] Date format in public update field

By Dave - January 27, 2010

Hi Jayme,

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!
Dave Edis - Senior Developer
interactivetools.com