-
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks