简体   繁体   English

我们如何将当前日期转换为儒略日期/天

[英]How can we convert a current date to Julian date /day

How can we format the current date into the Julian date?我们如何将当前日期格式化为儒略日期?

And how can we format the current date into HHMMSS format without '.'以及如何将当前日期格式化为HHMMSS格式而不带 '.' 'S? 'S?

For example:例如:

I should get the format as :123022 not in 12.30.22我应该得到格式为:123022而不是12.30.22

you can format the date with the to_char function and an mask.您可以使用to_char函数和掩码格式化日期。

For example to display HHMMSS use:例如显示 HHMMSS 使用:

select to_char(sysdate, 'HHMISS') from dual;

To see the Julian time use:要查看儒略时间,请使用:

select to_char(sysdate, 'J') from dual;

You can see more information about the mask here: to_char function您可以在此处查看有关掩码的更多信息: to_char 函数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM