Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on August 09, 2021, 06:52:18 PM
-
Is there a structure member that will return the current day of the year without doing math? For example 1/1/21 = 1, 8/9/21 = 221.
-
Sorry, no.
Fill in UDT0 with 1/1/$Now.Year. 0:00:00 (midnight Jan 1 of current year)
DT2EPOC UDT0 to D100
MATH D101 (DST21 - D100) / (24 * 3600) // D101 contains number of full days since Jan1; add 1 if you want it to truncate up, i.e Jan 1 you want 1, not 0