1

Im using cfspreadsheet to read data from spreadsheets inside one of my applications. I've had a great deal of difficulty dealing with date columns. If I format the cell as date english (NZ) it displays right in the spreadsheet, but when I try to upload it switched the day and month. But If I change the format to a custom "dd/mm/yyyy" format it will upload without a problem.

Why would using the default date formats within the spreadsheet mess up the format when a custom one doesn't? Is there a work around?

Rumpleteaser
  • 4,142
  • 6
  • 39
  • 52

1 Answers1

0

I was using the Date Type "*14/03/2001".

The * means that it will: respond to changes in regional date and time settings that are specified for the operating system.

So it must have been getting turned about by java or CF somewhere along the way. I changed it to the same date mask without the asterisk and the problem stopped occurring.

Rumpleteaser
  • 4,142
  • 6
  • 39
  • 52
  • 1
    Coldfusions internal date time object is american date orientated and by default will interperet dates and times into american format. it's pretty much my only complaint about CF – Dpolehonski Oct 17 '12 at 08:00
  • @Dpolehonski - Are you talking about date *functions*, rather than objects? The *standard* date functions (parseDateTime, dateFormat, etcetera) do use US date formatting conventions. If you are supporting i18n, you should be using the `LS*` functions instead. – Leigh Oct 25 '13 at 12:28