Interval type Description
yyyy Extracts the year
q Quarter (the result is 1, 2, 3 or 4)
m Month (the result is from 1 to 12)
y Day of year (1 to 365 or 366 in a leap year)
d Day part of the date (1 to 31)
w Day of week (1 to 7 with the result depending on firstDayOfWeek)
ww Week of year (1 to 53 with firstDayOfWeek and firstWeekOfYear determining the exact days of the first calendar week of the year)
h Extracts the hour part of the given DateTime (0 to 23)
n Minute part (0 to 59)
s Second part (0 to 59)
Datepart ("yyyy", your value)
Hello from almost 5 years in the future! Thank you for this list - I've recently returned to writing Crystal reports and was going nuts trying to figure this out.
ReplyDelete