开发者

how to hold datetime into a field in oracle?

开发者 https://www.devze.com 2022-12-15 14:36 出处:网络
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?

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

精彩评论

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

关注公众号