将 Excel 日期编号更改为 Oracle 日期 [英] Change Excel date number to Oracle date

查看:35
本文介绍了将 Excel 日期编号更改为 Oracle 日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 oracle 中的日期为 41293,我如何以 DD/MON/YYYY 格式显示它?

I'm having date as 41293 in oracle, how can i show it in DD/MON/YYYY format?

如果我将其复制粘贴到 Excel 中并将其更改为日期格式,则会显示 01/19/13请帮帮我.

If i copy pasted it in Excel and change it to date format, it shows 01/19/13 Please help me.

推荐答案

您拥有的值是自 1899 年 12 月 30 日以来的天数.尝试:

The value you have is the number of days since the 30th of December 1899. Try:

select to_char(
  to_date('1899-12-30', 'YYYY-MM-DD') + 41293,
  'DD/MON/YYYY') from dual

这篇关于将 Excel 日期编号更改为 Oracle 日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆