I've gotten it now. Thanks.
-----Original Message----- |
Below is a line from a select query I'm running where I'm
trying to select the 4th of the following month as a
SELECT (CASE WHEN Month(GetDate())<>12 THEN (Year(GetDate
()) Month(GetDate()+1) Day(4)) ELSE (Year(GetDate()+1)
Month(1) Day(4)) END) AS NextPlacementDate
As you see, I'm using the CASE WHEN function to handle
situation correctly to get it to roll over to the next
year in December. However, I don't know how to combine
each part of the date (year, month, day) to create an
actual date listed as "NextPlacementDate". In Access, you
can use "DateSerial(year,month,day)" to combine the
numbers from each part and get a date, but I've noticed
SQL that DateSerial doesnt' seem to work. I've tried
different ways of combining these numbers, but have had
luck so far.
Any help will be greatly appreciated.