wulfshayde
asked on
Coldfusion MySQL Date Issue
Okay, heres all the facts to make sure things are understood. I live in Australia, so date format is dd/mm/yyyy. I ensure that the date format is dd/mm/yyyy for entry purposes, but then in the sql I enter #DateFormat(form.datefield ,"yyyy-mm- d"). As long as my date is any day over 12 it puts it into the MySQL database properly. If for example, I enter 10/09/1979 (10th of September 1979) it will for some reason swap the month and the day so that its 09/10/1979 in mysql. However if I enter 25/09/1979 it enters it into the database as 25/09/1979. Any ideas? Whatever it is doing, it happens either in #Dateformat(form.datefield ,"yyyy-mm- d") or in MySQL.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Skip it, it was something stupid. I needed to use LSDateFormat rather than DateFormat. Can I give 100 points to pinaldave for his help and have the rest of my point PAQ'd?
Hi wulfshayde,
yes you can do this. you have to post question in the community support https://www.experts-exchange.com/Community_Support/
Regards,
---Pinal
yes you can do this. you have to post question in the community support https://www.experts-exchange.com/Community_Support/
Regards,
---Pinal
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This will also assist you if you ever need to convert the website to use other locales, like US etc..
I am working on a HP site that needs to support multiple languages (locales) and I convert every date to a date object with createDate( year, month, day )
I am working on a HP site that needs to support multiple languages (locales) and I convert every date to a date object with createDate( year, month, day )
ASKER
@Tacobell777
I am in Darwin and Working on the Perkins Shipping Intranet site. I'll check out CreateDate today, thanks for the heads up, that could save me loads of time.
I am in Darwin and Working on the Perkins Shipping Intranet site. I'll check out CreateDate today, thanks for the heads up, that could save me loads of time.
ASKER