Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
SqlPlus Date/time help
Old 11-29-2007, 07:19 PM SqlPlus Date/time help
Junior Talker

Posts: 1
Trades: 0
Hi I have created a table which has a location and time columns

CREATE TABLE TEST
(location CHAR(20) PRIMARY KEY,
Time date );
INSERT INTO TEST VALUES
(1,TO_DATE('14:30:00','HH24:MI:SS'));

When i

select * from test;

all i get from the time column is 1-Nov-07

How do i insert the time in date field and then retrieve the entered time with a query
JAMES59 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-29-2007, 07:54 PM Re: SqlPlus Date/time help
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
You're doing that.

It's stored as a date data type, which is a binary representation of a date. When you select * it, the server returns the default collation for date values. You would want to apply formatting to the value coming out of the query to see it in one format versus another.

Although on reflection it looks like you're using MySQL instead of SQL Server, and a time data type. Is that set up to store both the date and time?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to SqlPlus Date/time help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11145 seconds with 12 queries