Hi everyone,

So I need to find out if a date entered is a Sunday. If it is, I gotta do something special with this data. I'm not sure if Datepart will help or how to use it effectively to extract if it's a Sunday or if it's 1st day of the week (well if the week starts at Sunday).

Any help? Thanks.

Select GetDate() --2009-09-17 16:47:34.720
Select DatePart(dw, GetDate()) --5
Select DateName(dw, GetDate()) --Thursday
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.