|Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Enhancement Requests and Suggestions » View Thread|
|Messages 1 to 3 of 3 total|
|CAST(datecol AS humanstyledate)|
|Wed, Aug 1 2007 7:56 AM||Permanent Link|
I know its possible to extract the component parts of a date and build into a "normal" character string (eg dd/mm/yyyy) but can we have a simpler way to do it eg CAST(datecol AS humanstyledate). I'd be happy with it using the system date format or possibly an extension like
CAST(datecol AS CHAR(10) FORMAT 'dd/mm/yyyy')
The reason is I often want to join a date to a string field for display purposes - until now I've been doing it with calculated fields but I'm trying to use more sql and something like
IF(_Date IS NOT NULL,CAST(_Date AS CHAR(10))+ ' ','') +_Status + ': '+ _Stage AS _InProcess,
gives it in yyy-mm-dd format
|Wed, Aug 1 2007 9:49 AM||Permanent Link|
"Jose Eduardo Helminsky"
It will be amazing if the FORMAT could be used by any data type (like a
mask). Even if it is non standard it will be a very good feature. Imagine
select cast(cod format '####0') as "Code", cast(dat format 'dd/mm/yyyy') as
"Date", cast(val format '##,##0.00') as Value from tablex order by 2 desc
|Wed, Aug 1 2007 2:01 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< I know its possible to extract the component parts of a date and build
into a "normal" character string (eg dd/mm/yyyy) but can we have a simpler
way to do it eg CAST(datecol AS humanstyledate). I'd be happy with it using
the system date format or possibly an extension like >>
I will add this to the list. It most likely would end up being a keyword
extension to the CAST function.