Data types

Hi,

I have a table with a field called ddate which has the type DATETIME-TZ.
This means when I display the ddate in a form it displays:

18/08/2005 11:06:50,343+02:00

Now I want only 18/08/2005 without the time and time zone displayed.
Also I don't want to change the type to date because in a later page I need the time aswel.

So how to display only the date?

Thanks!
 

Casper

ProgressTalk.com Moderator
Staff member
Use the date() function:

DATE ( datetime-expression )

datetime-expression
  • An expression that evaluates to a DATETIME or DATETIME-TZ. The DATE function returns the date portion of the datetime-expression as a DATE.
    If datetime-expression is a DATETIME-TZ, the DATE function returns the date relative to the time zone of the DATETIME-TZ value. For example, a DATETIME-TZ field, fdt, is created in London (time zone UTC+00:00) with a value of May 5, 2002 at 7:15:03.002 am. DATE (fdt) returns 05/05/2002, regardless of the session’s time zone.

RTFM :)

Greetz,

C
 
Top