| Comment | SQLServer User-Defined Function
PURPOSE
Return the description of the weekday for a given date.
This function is independant from @@DATEFIRST.
PARAMETERS
@datum_in DATETIME Given date
@taal_in VARCHAR(2) Language ([UK], NL)
@lengte_in INT Length (1-[9])
@lett_in VARCHAR(1) Case ([C]=Capitalized, U=Uppercase, L=Lowercase)
RETURNS VARCHAR(9) Description of the weekday
EXAMPLES
1)
SELECT dbo.fun_date2weekday(getdate(),'NL',2,'U')
MA
2)
SELECT naam, dbo.fun_date2weekday(gebdat,'NL',3,'C'), gebdat from T_PERSOON
Gerrit Maa 15-02-1957
Hans Din 10-10-1958
Bart Woe 11-11-1959
HISTORY
2004-12-07 - Created function
2014-10-21 - Renamed function from fun_dag to fun_date2weekday
2024-02-09 - Changed history table
TAGS
<program>
<description>Return the description of the weekday for a given date</description>
<generic>1</generic>
<author>Gerrit Mantel</author>
<created>2004-12-07</created>
<lastmodified>2024-02-09</lastmodified>
</program> |