Date/time calculations with Julian dates

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Date/time calculations with Julian dates

I have a Julian date and time that I need to use as part of a computation(essentially I need to determine if that date/time is more than 30 minutes past the current date/time).

 

The date/time is in the format of YYYYDDD HHMM(e.g. - 2016287 1010)

 

I believe I need to use INTCK to perform this calculation, and my current Julian date won't work with that.

 

I can use DATEJUL to covert that Julian date to a sasdate, but I don't know how to incorporate the time into that as well.

 

Appreciate any assistance.


Accepted Solutions
Solution
‎10-13-2016 05:16 PM
Respected Advisor
Posts: 4,810

Re: Date/time calculations with Julian dates

Use

 

time = input(timePart, hhmmss4.);

datetime = dhms(myDate, hour(time), minute(time), 0);

PG

View solution in original post


All Replies
Super User
Posts: 11,107

Re: Date/time calculations with Julian dates

Use the DHMS function with your date if you have a SAS time value to combine:

 

JulDateTime = DHMS(juldate,0,0,time);

 

Solution
‎10-13-2016 05:16 PM
Respected Advisor
Posts: 4,810

Re: Date/time calculations with Julian dates

Use

 

time = input(timePart, hhmmss4.);

datetime = dhms(myDate, hour(time), minute(time), 0);

PG
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 274 views
  • 0 likes
  • 3 in conversation