Subject | Working with dates output / input blues (server side) |
---|---|
Author | clementdoss |
Post date | 2003-08-18T12:28:22Z |
Hi all,
Everytime I have to work with date/datetime with FB I get into troubles.
There are lots of different date layouts, and I need to import/export
them.
For example. I have a TXT file that have a date format like : YYYYMMDD
(more common).
But I got also YYMMDD , DD.MM.YYYY, DD/MM/YYYY , MM/YYYY, MMYYYY, ...
, etc..
Is there a UDF function to help convert CHAR -> DATE and DATE -> CHAR?
Something like:
CONVERTDate2TXT( Expression , Layout )
ConvertDate2Txt( now , 'YYYYMMDD') would output 20030818.
and
ConvertTXT2Date( Expression , Layout )
ConvertTXT2Date( '20030818' , 'YYYMMDD') would output 18/08/2003
(date format)
Is there a function (or UDF) that already does this?
If there's isn't, would somebody help me write it?
Best regards,
Clément
Everytime I have to work with date/datetime with FB I get into troubles.
There are lots of different date layouts, and I need to import/export
them.
For example. I have a TXT file that have a date format like : YYYYMMDD
(more common).
But I got also YYMMDD , DD.MM.YYYY, DD/MM/YYYY , MM/YYYY, MMYYYY, ...
, etc..
Is there a UDF function to help convert CHAR -> DATE and DATE -> CHAR?
Something like:
CONVERTDate2TXT( Expression , Layout )
ConvertDate2Txt( now , 'YYYYMMDD') would output 20030818.
and
ConvertTXT2Date( Expression , Layout )
ConvertTXT2Date( '20030818' , 'YYYMMDD') would output 18/08/2003
(date format)
Is there a function (or UDF) that already does this?
If there's isn't, would somebody help me write it?
Best regards,
Clément