-
SELECT statement and time format
I have a table with:
time DATE,
as a data item and have inserted values, example:
(..., TO_DATE('08:00 AM', 'HH:MI AM'), ...);
When I select 'time', I receive output:
TIME
---------
01-FEB-01
...instead of having a time value returned. My question is this: How can
I structure my SELECT statement so that the data returned from my time column
is formatted as 'HH:MI am' ?
-
Re: SELECT statement and time format
"JeffM" <urm_the_mad@yahoo.com> wrote:
>
>I have a table with:
>time DATE,
>as a data item and have inserted values, example:
>(..., TO_DATE('08:00 AM', 'HH:MI AM'), ...);
>When I select 'time', I receive output:
>TIME
>---------
>01-FEB-01
>
>...instead of having a time value returned. My question is this: How can
>I structure my SELECT statement so that the data returned from my time column
> is formatted as 'HH:MI am' ?
>
-
Re: SELECT statement and time format
hey Jeff,
you can do something like this :
1 select to_CHAR(sysdate,'HH:MM:SS')
2* FROM DUAL
SQL> /
TO_CHAR(
--------
05:02:24
"JeffM" <urm_the_mad@yahoo.com> wrote:
>
>I have a table with:
>time DATE,
>as a data item and have inserted values, example:
>(..., TO_DATE('08:00 AM', 'HH:MI AM'), ...);
>When I select 'time', I receive output:
>TIME
>---------
>01-FEB-01
>
>...instead of having a time value returned. My question is this: How can
>I structure my SELECT statement so that the data returned from my time column
> is formatted as 'HH:MI am' ?
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|