Re: How to convert "Thu Nov 17 06:44:23 CST 2005" to date ?

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Tue, 10 Mar 2009 22:36:44 +0100
Message-ID: <49B6DD6C.6030405_at_gmail.com>



admin_at_rbtron.com schrieb:
> Hi,
>
> How to convert "Thu Nov 17 06:44:23 CST 2005" to date ?
>
> This works :
>
> select to_date('Thu Nov 17 06:44:23 2005','Dy Mon DD hh24:mi:ss yyyy')
> from dual;
>
> But when timezone is added in between, it doesn't.
>
> Thanx
>
> -Adm

Datatype date has no idea about timezone ;-) If you need this information to be accounted by the date value, you have   (before cast) to utiliize from_tz

SQL> select cast(to_timestamp_tz('Thu Nov 17 06:44:23 CST 2005','Dy Mon DD hh24:mi:ss TZD yyyy') as date)

   2 from dual
   3 ;

CAST(TO_TIMESTAMP_T



17.11.2005 06:44:23

Best regards

Maxim Received on Tue Mar 10 2009 - 16:36:44 CDT

Original text of this message