| Author |
Topic  |
|
|
ajr
Starting Member
11 Posts |
Posted - 11/16/2006 : 12:51:44
|
Hello all. I know some of the basics, but I am by no means a guru like alot of the people here, and I'm learning by fire! lol Here's a question that will problably be a breeze to you guys. I have a spec they want a query for, but I'm not sure where to start. I found a command called SET DATEFORMAT, but not really sure how to use it, or if it's even waht I need. Anyway here's what I was given to work from. I'd appreciate ay help you can give:
This interface service describes how to populate the EFFDT field in the Project_7 table for a GL record.
Input Parameter: G01.Acc_Eff_DT
Reference table: G01
1. If the code is being run for the first time return ‘2006-12-21’. 2. Else if the current day of the week is Thursday return the date in the format of ‘YYYY-MM-DD’. 3. Else return the date of the next Thursday in the format of ‘YYYY-MM-DD’.
|
Edited by - ajr on 11/16/2006 13:02:54
|
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 11/16/2006 : 13:02:52
|
Got Books online?
Also you talk about insert/update, and then discuss "return"
What excatly do you have to do...
I suspect you want to do
SELECT REPLACE(CONVERT(char(10),GetDate(),102),'.','-')
Just replace GetDate with your column
But this really is a presentation issue...I ithink..you don't need to worry about formatting dates in sql server
Brett
8-)
Hint: Want your questions answered fast? Follow the direction in this link http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Add yourself! http://www.frappr.com/sqlteam
|
 |
|
| |
Topic  |
|
|
|