Hello All:
Yes, another date format problem! I have read all the FAQ's and postings and followed all the links; I have looked in Books on Line and STILL can't solve this problem!
In a Select statement, I simply need to return a date incremented to be the 10th of the following month.
The date value is stored in the database as an integer in the format yyyymmdd. I have found the following successfully converts this to a date format:
Convert(Datetime, Convert(varchar,(ar_due_dt))
I then use Dateadd to increment the month:
Dateadd, mm,1(Convert(Datetime, Convert(varchar,(ar_due_dt)))
My attempted solution was to convert this to a varchar so I could parse the date into the format yyyymm, then concatenate '10' to get my final result back into the format yyyymmdd. However, the varchar conversion returns 'Jan' for the month.
It just seems like there MUST be an easier way to do this!
Help!
Yes, another date format problem! I have read all the FAQ's and postings and followed all the links; I have looked in Books on Line and STILL can't solve this problem!
In a Select statement, I simply need to return a date incremented to be the 10th of the following month.
The date value is stored in the database as an integer in the format yyyymmdd. I have found the following successfully converts this to a date format:
Convert(Datetime, Convert(varchar,(ar_due_dt))
I then use Dateadd to increment the month:
Dateadd, mm,1(Convert(Datetime, Convert(varchar,(ar_due_dt)))
My attempted solution was to convert this to a varchar so I could parse the date into the format yyyymm, then concatenate '10' to get my final result back into the format yyyymmdd. However, the varchar conversion returns 'Jan' for the month.
It just seems like there MUST be an easier way to do this!
Help!