DATENAME (SQL Server Compact)
Returns a character string representing the specified datepart of the specified date.
SQL Server Compact automatically converts between character and datetime values as necessary, such as when you compare a character value with a datetime value.
The following table lists the datepart options and abbreviations recognized by SQL Server Compact.
|
Datepart |
Abbreviations |
|---|---|
|
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 |
* The weekday (dw) datepart returns the day of the week, for example, Monday.
