Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C Style Date string - Return date from Julian date
#1
C Style Date string - Julian date

I understand that s.time("%y") gives today's day of year as decimal number, ie. julian day in this year.
I also understand that this function is now obsolete and it is replaced by str.timeformat. I wonder whether anyone has implemented the oposite function - action, ie to return the date-month string from the julian day in this year. Any advice much appreciated.
#2
Macro Macro2252
Code:
Copy      Help
;out _s.time("%j")

int dayOfYear=112

SYSTEMTIME st; GetLocalTime &st
DateTime d.FromParts(st.wYear 1 1)
d.AddParts(dayOfYear-1)

out d.ToStr
;out d.GetDayOfYear
#3
Perfect, as it happens always with Gintaras.

Best personal regards


Forum Jump:


Users browsing this thread: 1 Guest(s)