oracle date and coldfusion date

anno (烦人)
<本文发表于: 相约加拿大:枫下论坛 >
This is a pretty funny story:
I'm using ColdFusion and Oracle as db server.
in my application.cfm I set db date format as this.


then when I insert '03/18/02' into a table column(date type),
oracle take it as 03/18/0002, this is fine still although it's already becoming funny.
The joke is here:
when you get this date out and use couldfuion
dateformat(date_value, "MM/DD/YYYY") to show on the page,
It's 03/18/2002 now.

That means, acturally in oracle, you have 03/18/0002, but you can see only 03/18/2002 on the page.

even more than this, when I use sql plus or other tools, most of the tools will show only
03/18/02 or change this date to 03/18/2002.

It gave me a realy hard time to find out what happend in the system.
Cause before you realize this is the problem, you can't find out how come what you can see
03/18/2002 and another 03/18/2002 is not the same day.....

Don't know who had this before, maybe there's some solutions already.

<本文发表于: 相约加拿大:枫下论坛 >

2002-2-22 -04:00

回到话题: oracle date and coldfusion date

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论