Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I need to add one month to given date.

i need the answer ,if i give 30 th date of month ,need 31 .

Fox example.

SQL
select CustLDueDt ,DATEADD(M,1,CustLDueDt) from LOln_LnDetails_h where Lnno='MNDPLPJ08310016'


Ouptput is : 2012-08-30 00:00:00.000
2012-09-30 00:00:00.000


bit i need 2012-08-30 00:00:00.000
2012-09-31 00:00:00.000


any one help
Posted

1 solution

September have not 31 days

Happy Coding!
:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900