Counting the year in julian dates

조회 수: 7 (최근 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