Do anyone here Know how to get the previous month of a given date..
given date: 11/25/2012
thank you.. i know you can help me ..
well i dont know the exact function name that can solve the issue but you can use of the following to generate the same:-
dt = Month(Date) - 1 & "/" & Day(Date) & "/" & Year(Date)
hope this helps you . . .
Something like this should work:
Dim dt As Date dt = #11/25/2012# 'DateAdd is a function specifically designed for date math operations. dt = DateAdd("m", -1, dt) MsgBox (dt)
Here's the MSDN page
Thank you for the Help..