Xavier
|
| Posted: 05/09/2002, 1:40 AM |
|
Hello,
I've a PgSql db with a date column defined as
req_date timestamp default now()
and I would like CC convert it to the format dd MMM YYYY, hh:mm
for instance
09 May 2002, 10:43
So I set in default value for date field
=Date("d M Y, H:i")
and "date" as data type.
This is for the _insert_ page.
This page shows the date, formatted as I want, in the date field. But when
one accept to insert the new record, in db field date is stored in pgsql
format, like 2002-05-09 10:23:41+02, and it's showed in this way in all
other pages.
Should I try some pgsql command to force date to be stored as I want or
should I try to use CC formatting to show the date properly?
thanks a lot
Xav
|
|
|
 |
Barry G. Sumpter
|
| Posted: 05/09/2002, 2:09 PM |
|
Did you look at your regional settings.
You can also trap it in the Before Show Insert Event:
date_assigned=Date()
date_fixed=format(date_fixed,"yyyy mm dd hh:mm")
baz
"Xavier" <nobody@nowhere.invalid> wrote in message
news:abdclt$v4a$1@news.codecharge.com...
> Hello,
> I've a PgSql db with a date column defined as
> req_date timestamp default now()
>
> and I would like CC convert it to the format dd MMM YYYY, hh:mm
> for instance
> 09 May 2002, 10:43
>
> So I set in default value for date field
> =Date("d M Y, H:i")
> and "date" as data type.
> This is for the _insert_ page.
> This page shows the date, formatted as I want, in the date field. But when
> one accept to insert the new record, in db field date is stored in pgsql
> format, like 2002-05-09 10:23:41+02, and it's showed in this way in all
> other pages.
> Should I try some pgsql command to force date to be stored as I want or
> should I try to use CC formatting to show the date properly?
>
> thanks a lot
> Xav
>
>
|
|
|
 |
Xavier
|
| Posted: 05/10/2002, 9:22 AM |
|
"Barry G. Sumpter" <bsumpter@bigpond.net.au> ha scritto nel messaggio
news:abeohm$ios$1@news.codecharge.com...
> Did you look at your regional settings.
>
> You can also trap it in the Before Show Insert Event:
> date_assigned=Date()
> date_fixed=format(date_fixed,"yyyy mm dd hh:mm")
>
> baz
Can u explain better please?
In my db field date is stored as yy mm dd
(I just changed psql settings to avoid hour & minutes problems)
and I simply want to display it in format dd/mm/yy.
I get it in a record form using Field Properties/Common/Default Value
=Date("d m y") , but not in other pages, cause I think these pages re-read
date from db and Default Value is unuseful.
Alex
|
|
|
 |
|