daynumberofyear - script and chart function

This function calculates the day number of the year in which a timestamp falls. The calculation is made from the first millisecond of the first day of the year, but the first month can be offset.

Syntax:  

DayNumberOfYear(timestamp[,start_month])

Return data type: integer

The function always uses years based on 366 days.

Arguments:  

Argument Description
timestamp The date to evaluate.
start_month By specifying a start_month between 2 and 12 (1, if omitted), the beginning of the year may be moved forward to the first day of any month. For example, if you want to work with a fiscal year starting March 1, specify start_month = 3.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?