Friday 30 May 2014

Date intervals for VB and Tsql

Date intervals for Sql Server



year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw
hour hh
minute mi, n
second ss, s
millisecond ms

Usage  DATEPART(datepart,date)


Dates for Visual Basic

DateInterval.Day d Day of month (1 through 31)
DateInterval.DayOfYear y Day of year (1 through 366)
DateInterval.Hour h Hour
DateInterval.Minute n Minute
DateInterval.Month m Month
DateInterval.Quarter q Quarter
DateInterval.Second s Second
DateInterval.Weekday w Day of week (1 through 7)
DateInterval.WeekOfYear ww Week of year (1 through 53)
DateInterval.Year yyyy Year
Usage DatePart(DateInterval.Quarter, ActualDate)

No comments:

Post a Comment

Passwords Made Easy

Today i thought i would write about password security. As we are all aware passwords are important but we continue to use very poor password...