Irishiii75
Technical User
I need to know if this can be done
Calculate the last day of the month for a calculated date
(I want to calculate the end of the month, 45 days from today.
SQL version 8.00
I have this in a select statement
CONVERT (CHAR (8), DATEADD (dd,45, Getdate()),112) as contend
This produces 20020607, when run today.
Can I add anything to it to produce 20020630 (in this case).
If it is run on May 2, it would produce 20020615 and I want to finally produce 20020630.
If it is run on May 22, it would produce 20020705 and I want to finally produce 20020731.
Thanks for any input
Calculate the last day of the month for a calculated date
(I want to calculate the end of the month, 45 days from today.
SQL version 8.00
I have this in a select statement
CONVERT (CHAR (8), DATEADD (dd,45, Getdate()),112) as contend
This produces 20020607, when run today.
Can I add anything to it to produce 20020630 (in this case).
If it is run on May 2, it would produce 20020615 and I want to finally produce 20020630.
If it is run on May 22, it would produce 20020705 and I want to finally produce 20020731.
Thanks for any input