Thursday, March 22, 2012

day

How do you get the name of today? i.e. is it monday, tuesday, ...?
Thankstry this:

select DATENAME(dw,'05-09-2007')

will return the day of the week

[EDIT] even better:

begin
declare @.date varchar(50)
set @.date = getdate()
select DATENAME(dw,@.date)
end

Cheers

No comments:

Post a Comment