开发者

how to hold datetime into a field in oracle?

will date datatype hold datetime? its not taking datetime.

i have to store datetime int开发者_运维问答o a field in table, for that which datatype i have to use?

Thanks, Srikanth


The date field does hold date time but you'll need to use the to_date function

for example, if you're trying to insert 2009/01/04 09:00:00 you will use

insert into table_name
(date_field)
values
(to_date('2010/01/04 09:00:00', 'yyyy/mm/dd hh24:mi:ss'));

Note the datetime mask used to tell the field what format the data is arriving in

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜