Re: date format mask?

Why so complicated?

SQL> select 
to_date('2011-05-24T23:21:30.000Z','yyyy-mm-dd"T"hh24:mi:ss".000Z"') from dual;

TO_DATE('2011-05-24
-------------------
2011-05-24 23:21:30

1 row selected.

You can have any number and kind of additional characters in the dat mask. You 
just need to enclose them in "

On 2011-06-09, at 6:33 PM, David Fitzjarrell wrote:

> SQL> begin
>   2     :l_amazon_date := substr(translate('2011-05-24T23:21:30.000Z', 'TZ',' 
> '),1, instr(translate('2011-05-24T23:21:30.000Z', 'TZ',' '),'.') - 1);
>   3  end;
>   4  /
> PL/SQL procedure successfully completed.
> SQL>
> SQL> select TO_DATE(:l_amazon_date, 'YYYY-MM-DD HH24:MI:SS')
>   2  from dual;
> 

Other related posts: