I think you will need to loop backwards from the last day of the month
until you find the first (last) Thursday.  You will probably need to put
this in a stored procedure.

You will also need to use a date function that returns "Monday",
"Tuesday", etc so you can look for "Thursday".  Then, you can make note
of that particular date and compare it to the passed-in date.

M!ke

-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 10:25 AM
To: CF-Talk
Subject: RE: OT-SQL DATE QUESTION

Are you trying to determine what day of the month, the last Thursday
falls on Or just if the 31st in this case is a Thursday? 

-----Original Message-----
From: Eric Creese [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 20, 2005 11:19 AM
To: CF-Talk
Subject: OT-SQL DATE QUESTION

Okay I have a function that retrieves the last day of the month based on
feeding it todays date which would return 1/31/2005. I am trying to
modify this function to determin if today is the last Thursday of the
month. Does anyone have any ideas for this? I have tried a few things
like using the day of the week number but I am getting nothing and
looked out on the web and have not found much. This is for SQL2K






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191239
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to