Returns the start date of the year passed to the function. The time returned is 12:00:00 AM.
= STARTOFYEAR(valueDate)
valueDate |
A date time value whose start date of the week is to be determined. The value can contain DateTime as a string (e.g. “02/19/2009 14:30:30.3”, "2009-02-19 14:30:30.3", "19 Feb 2009 2:30:30.3 PM ", "Thu, 19 Feb 2009”) or as a DateTime object. |
DateTime. The function returns a Microsoft .NET DateTime object. Any properties or member functions of the DateTime object can also be accessed or used in formulas.
Example |
Returns |
= STARTOFYEAR(“2/2/2010”) |
1/1/2010 12:00:00 AM |
= STARTOFYEAR(“2/2/2010”).Year |
The year extracted from start of the year. |
= STARTOFYEAR(“2/2/2010”).AddDays(-1) |
The end date of the year previous to the given date. |
= STARTOFYEAR(“2/2/2010”).AddDays(-1).YEAR |
The year previous to the given date. |
http://msdn.microsoft.com/en-us/library/system.datetime_members(VS.71).aspx