Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old June 15th, 2004, 08:45 PM
mwilkison mwilkison is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 mwilkison User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
displaying date/time fields

need help displaying full date/time field in DBartisan for Oracle....
selecting data for date/times between 13:00 and 21:30
but display jonly shows DATE but not timestamp.
thanks

Reply With Quote
  #2  
Old June 16th, 2004, 07:30 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
By default Oracle stores timestamp 00:00:00 if not provided by the user. You need to use TO_CHAR function to retrieve your required date format, lets see the example below:

SELECT empno,ename,sal,deptno,TO_CHAR(hiredate,'DD-Mon-YYYY HH24:MI:SS')
FROM emp;
/

If you need to execute such a query that requires only timestamp then ommit date portion, only use timestamp, let's see another query:

SELECT empno,ename,sal,deptno,TO_CHAR(hiredate,'HH24:MI:SS')
FROM emp
/

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > displaying date/time fields


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway