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

datepicker date format for european use and date conversion in the table field

Thread began 3/15/2010 11:05 am by davas56386677 | Last modified 3/18/2010 1:49 pm by davas56386677 | 2553 views | 3 replies


datepicker date format for european use and date conversion in the table field

Does anybody have an idea how I can resolve the following problem in PowerStore 3 coupons_Insert.php and couons_Update.php to store the CouponStartDate and the CouponEndDate with the format required by the corresponding field in the coupons table.
As I needed to localize PW3 to French (and later to German) I had to modify the jquery-ui-1.7.1.custom.min.js file in CSSFormBuilder according to the instructions published on the jQUERY site (UI/Datepicker/formatDate) for the datepicker function and so on, to be able to use the European date input (dd/mm/yy) (e.g. 24 mars 2010 for 24th march 2010)
I also modified the CouponStartDate_Spry and the CouponEndDate_Spry to format:'dd/mm/yyyy'.
Everything works fine on the page in the browser. The datepicker reacts as it should for European date and stores e.g. 28/03/2010 (for 28th march 2010). It validates correctly in the form field on the screen.
But when it comes to store that date into the field of the database (MySQL), then the date stored is 01/01/1970, which in turn indicate that the .((isset($_POST["CouponStartDate"]))?date('Y-m-d',strtotime($_POST["CouponStartDate"])):"") ."" function in the query of coupons_Insert.php did not work fine.
Some type of string conversion or manipulation must be done (and furthermore also in coupons_Update.php) to store the date with the format needed in the table’s date field.
Should I issue a mysql_query("SET lc_time_names = 'fr_FR'"); before runnin the actual query. I’m not sure that it will solve my problem.
Any help is welcome

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...