close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Date from Form to Database

Thread began 9/10/2009 10:07 pm by jebrandon343719 | Last modified 9/11/2009 1:32 am by tom92909 | 1106 views | 2 replies |


Date from Form to Database

Hi, How do I convert a date entered in a form in say a format like dd/mm/yy and convert it to a date that can be inserted into a database (which had a format yyyy-mm-dd)

Sign in to reply to this post


Do you want to do it with WebAssist tools? Or, the hard way where you have to use the explode command to get the various date parts split apart and then re-apply them into variable the correct order.

If you have Validation Toolkit, you can apply a client validation and define the accept value and then in the same dialogue box, it allows you to pick a format to convert it to. This method, however, does use javascript to reformat the date.

Sign in to reply to this post

tom92909Beta Tester

Is it required in the form for the user to actually enter the date in question? Or is the actual system date sufficient? You could create a hidden input in the form to include the desired date format for you. Perhaps the following is a simple alternative?



<input name="date" type="hidden" value="<?php echo $mydate;?>" />
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...