Campbell Scientific CR1000 Measurement and Control System User Manual

Page 217

Advertising
background image

Section 7. Installation

217

 

'If it is a leap year, use this section.

If

(LeapYear = True)

Then

Select Case

DOY

Case Is

< 32

Month = 1
Date = DOY

Case Is

< 61

Month = 2
Date = DOY + -31

Case Is

< 92

Month = 3
Date = DOY + -60

Case Is

< 122

Month = 4
Date = DOY + -91

Case Is

< 153

Month = 5
Date = DOY + -121

Case Is

< 183

Month = 6
Date = DOY + -152

Case Is

< 214

Month = 7
Date = DOY + -182

Case Is

< 245

Month = 8
Date = DOY + -213

Case Is

< 275

Month = 9
Date = DOY + -244

Case Is

< 306

Month = 10
Date = DOY + -274

Case Is

< 336

Month = 11
Date = DOY + -305

Case Is

< 367

Month = 12
Date = DOY + -335

EndSelect

'If it is not a leap year, use this section.

Else

Select Case

DOY

Case Is

< 32

Month = 1
Date = DOY

Case Is

< 60

Month = 2
Date = DOY + -31

Case Is

< 91

Month = 3
Date = DOY + -59

Advertising