Subject Re: Casting a Date to a Varchar inverts its format?
Author legrand_legrand_63
> What I need is this:
> "01-01-2006 09:21"
> What am I missing here and how can I accomplish what I need?
> Thanks,
> -Benton

If you want to accomplish this in SQL, you should try to convert your
date to string using :
cast(extract(day from invoicedate) as char(2))
||'-'|| cast(extract( month from invoicedate) as char(2))...

you can also try to use an UDF like DATETOSTR(invoicedate,'%d-%m-%Y')
found at

or TO_CHARD(invoicedate,'DD-MM-YYYY) from