Can you explain what you're defining as "Julian date"? While the 4714 BCE reference date is the proper one for a real Julian date, I know the term is often used in my field to mean either day-of-year or days-since-reference-date. My guess is you want the last option, in which case
tstr = '2014-04-29 4:35:22';
jd = days(datetime(tstr) - datetime(2000,1,1))
2 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/523742-how-to-get-the-value-in-julian-date-and-time#comment_843158
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/523742-how-to-get-the-value-in-julian-date-and-time#comment_843158
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/523742-how-to-get-the-value-in-julian-date-and-time#comment_843219
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/523742-how-to-get-the-value-in-julian-date-and-time#comment_843219
Sign in to comment.