VIJAY BLOGS ON SQL
Wednesday, August 5, 2009
Identify saturday or sunday - sql script
declare date datetime
set date = '2008-08-03'
--for sunday
select case when datetime (dw,@date) = 'sunday' then 1 else 0 end
set date = '2008-08-02'
--for saturday
select case when datetime (dw,@date) = 'saturday' = 1 else 0 end
No comments:
Post a Comment
Newer Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment