Do anyone here Know how to get the previous month of a given date..
Example
given date: 11/25/2012
Output: 10/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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.