Counting the year in julian dates

1 次查看(过去 30 天)
Katie
Katie 2012-11-13
回答: Tom W 2014-7-29
I need to ask for the hire date and current date of an employee, convert it to julian date, and spit out how many days they've worked there. I know how to figure out julian date in days. How do I take care of the year issue?
  1 个评论
James Tursa
James Tursa 2012-11-13
My guess is you are confusing Julian Date with day-of-the-year. Can you please provide a specific example of inputs and desired output?

请先登录,再进行评论。

回答(1 个)

Tom W
Tom W 2014-7-29
You don't need julian days, all you need is today() minus hire date (with format). Difference in days will be the output.
or
gregorian("ThisYear", "ThisMonth", "ThisDay") - gregorian(Yr1,Mo1,Day1);

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by