Avatar of harlanhugh
harlanhugh

asked on 

Oracle 10g Date question

I am inserting this sql statement into an Oracle 10g database:

INSERT INTO ActivityLog(ID, date) values(41, to_date ('02-27-2007 09:17:55 PM', 'MM-DD-YYYY HH:MI:SS AM'))

It appears to work fine, but when I query it, only the date is showing?? Please explain what is going wrong. Thanks
Oracle Database

Avatar of undefined
Last Comment
harlanhugh
ASKER CERTIFIED SOLUTION
Avatar of vishal68
vishal68
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jwahl
jwahl
Flag of Austria image

the time is stored internally, you can make it visible with

SELECT TO_CHAR(date, 'MM-DD-YYYY HH:MI:SS AM')
FROM activitylog;
Avatar of harlanhugh
harlanhugh

ASKER

Ok, that did the trick. Sorry jwahl looks like you got beat by about one minute. Got to be quick on that submit button! :)
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo