Re: dateformat issue

From: Aarni Ruuhimäki <aarni(at)kymi(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Gavin 'Beau' Baumanis" <gavinb(at)eclinic(dot)com(dot)au>
Subject: Re: dateformat issue
Date: 2008-04-10 07:27:24
Message-ID: 200804101027.24977.aarni@kymi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thursday 10 April 2008 09:41, Gavin 'Beau' Baumanis wrote:
> Hi Aarni,
>
> just so you know I am using the CF built-in function,
> createodbcdate
>
> here is the info from livedocs.
>
> CreateODBCDate
> Description
>
> Returns a date in ODBC date format.
> Category
>
> Date and time functions
> Syntax
>
> CreateODBCDate(date)
>
> so I pass in 2008-01-23
> and I get back
>
> {d '2008-01-23'}
>
> The weirdness for me is that it works elsewhere in the application, I
> am really stumped.
>
> -Gavin.
>

That value shouldn't work at all ... ?

<cfoutput>

#Now()# ||

#CreateODBCDate(2008-04-10)# = #CreateODBCDate(1994)#

|

#CreateODBCDate('2008-04-10')#

|

#CreateODBCDate(Now())#

|

#DateFormat(Now(), "YYYY-MM-DD")#

|

#DateFormat('2008-04-10', "YYYY-MM-DD")#
</cfoutput>

Produces:
{ts '2008-04-10 10:26:21'} || {d '1905-06-16'} = {d '1905-06-16'} | {d
'2008-04-10'} | {d '2008-04-10'} | 2008-04-10 | 2008-04-10

This is on CFMX7.

Best regards,

--
Aarni Ruuhimäki
---
Burglars usually come in through your windows.
---

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tk421 2008-04-10 11:19:42 Re: dateformat issue
Previous Message Gavin 'Beau' Baumanis 2008-04-10 06:41:29 Re: dateformat issue