LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate Day of Year

Is there a quick and easy way to convert the Day of month, Month and Year to Day of Year?
0 Kudos
Message 1 of 21
(9,478 Views)
you can use get date/time string.vi and date format should be set to long 
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 21
(9,472 Views)
Convert a timestamp using the 'Format into String' function and a format of  %<%j>T. If you need the number, then convert the output using 'Decimal string to Number'
Message 3 of 21
(9,468 Views)

Yet another way.

 

DayOfYear.png

Message 4 of 21
(9,462 Views)

Or you could use Format Date/Time String, with the format string set to %j

 

 

0 Kudos
Message 5 of 21
(9,389 Views)

Hello, how do I do this for with the current time.

0 Kudos
Message 6 of 21
(8,239 Views)

@slovintern wrote:

Hello, how do I do this for with the current time.


Use the Seconds to Date/Time function and unbundle the Day of Year.  Do not have an input for the Seconds to Date/Time node as it defaults to the current time.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 21
(8,230 Views)

Thank you 🙂

0 Kudos
Message 8 of 21
(8,219 Views)

Hello,

 

how do I get month of year? is there any vi to get that?

0 Kudos
Message 9 of 21
(7,705 Views)

Same way as CrossRulz mentioned in his post.

 

Look at the Help for that function.  It has numerous outputs that could be useful for you.

0 Kudos
Message 10 of 21
(7,694 Views)