Coldfusion:cfspreadsheet错误地读取日期 [英] Coldfusion: cfspreadsheet reading date incorrectly

查看:424
本文介绍了Coldfusion:cfspreadsheet错误地读取日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cfspreadsheet从我的应用程序中的电子表格中读取数据。我处理日期列有很多困难。如果我将单元格格式化为日期英语(NZ),它会在电子表格中显示,但是当我尝试上传时,它改变了日期和月份。但是如果我将格式更改为自定义的dd / mm / yyyy格式,它会上传而没有问题。

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?

推荐答案

我使用的是日期类型* 14/03/2001。

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.

必须一直在转向由java或CF在某处的方式。我将其更改为相同的日期掩码,但没有星号,问题已停止。

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.

这篇关于Coldfusion:cfspreadsheet错误地读取日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆