Calendar Dates


i trying develop calendar, running persistent problem. have included script below. in dayname. have table numbers 1-31. associate date in month, last day in month wrong. why doing that, , have ideas how can fix that?

select cd.id, cd.[day]
, case
when datename (w,datepart(dd,cd.[day])-1) = 'monday' '2'
when datename (w,datepart(dd,cd.[day])-1) = 'tuesday' '3'
when datename (w,datepart(dd,cd.[day])-1) = 'wednesday' '4'
when datename (w,datepart(dd,cd.[day])-1) = 'thursday' '5'
when datename (w,datepart(dd,cd.[day])-1) = 'friday' '6'
when datename (w,datepart(dd,cd.[day])-1) = 'saturday' '7'
else '1'
end dayofweek
, datename (w,datepart(dd,cd.[day])-1) dayname
from caldates cd

i not want download extensions or software. trying out that.



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support