朱利安的一天到军事时间 - r

发布于 2025-02-13 23:53:15 字数 222 浏览 1 评论 0原文

我想将以下JD时间格式转换为其直觉上解释的军事格式(“%h:%m:%s”):

Julian Day Time格式

R中是否有功能可以执行此操作?关于如何转换为所需的军事时间格式的任何建议(“%h:%m:%s”)?

I want to convert the following JD time format to its intuitively interpretable military format ("%H:%M:%S"):

Julian Day time format

Is there a function in R to do this? Any suggestions on how to convert to the desired military time format ("%H:%M:%S")?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧故 2025-02-20 23:53:15

也许您想要这样的东西(感谢 @dave2e):

your_julian <- c(0.388025231484789, 0.388718518515816, 0.389415509256651, 0.390111689812329, 0.390806828705536, 0.392295023149927)
your_date <- as.POSIXct(your_julian*24*3600, origin="2022-07-08")
strftime(your_date, format="%H:%M:%S") 
#> [1] "11:18:45" "11:19:45" "11:20:45" "11:21:45" "11:22:45" "11:24:54"

在2022-07-08创建的(v2.0.1)

Maybe you want something like this (thanks to @Dave2e):

your_julian <- c(0.388025231484789, 0.388718518515816, 0.389415509256651, 0.390111689812329, 0.390806828705536, 0.392295023149927)
your_date <- as.POSIXct(your_julian*24*3600, origin="2022-07-08")
strftime(your_date, format="%H:%M:%S") 
#> [1] "11:18:45" "11:19:45" "11:20:45" "11:21:45" "11:22:45" "11:24:54"

Created on 2022-07-08 by the reprex package (v2.0.1)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文