cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to create monthly 'day of the year' numbers

MySchizoBuddy
1-Newbie

How to create monthly 'day of the year' numbers

DaysInMonth := (31 29 31 etc)

Jan := 1..31

Feb := 32..59

Mar := 60..90

Source file for M14 is attached

1 ACCEPTED SOLUTION

Accepted Solutions

It depends on what you intend to do with the data...(and you might want to post excerpts of large files that illustrate your point or need...)

You could create an array DaysInMonth 0..12 of ( 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

and this one

JulianDays array [0..12] of (0, 31, 59, 90,120,151,181,212,243,273,304,334,365)

Then it's up to you to use them...for example (do you intend to do real date stuff with them? leap years, etc?) Feb 2 is DaysInMonth[1 + 2 to get the Julian day of the year. I wouldn't be surprised to find that someone has already addressed this in the forum...

~R~

View solution in original post

4 REPLIES 4

It depends on what you intend to do with the data...(and you might want to post excerpts of large files that illustrate your point or need...)

You could create an array DaysInMonth 0..12 of ( 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

and this one

JulianDays array [0..12] of (0, 31, 59, 90,120,151,181,212,243,273,304,334,365)

Then it's up to you to use them...for example (do you intend to do real date stuff with them? leap years, etc?) Feb 2 is DaysInMonth[1 + 2 to get the Julian day of the year. I wouldn't be surprised to find that someone has already addressed this in the forum...

~R~

got it. thanks.

I just updated the Dates document with function to do this.

http://communities.ptc.com/docs/DOC-1395

Is this file required for the problem in question?

Even though I must add there's some good work within the worksheet now.

Mike

Top Tags