Hello I am working on a Report in SQL Server 2003
I have a text box showing the date:
textbox.Value =TODAY()
Please could some body tell me how I could display the date for just the previous month.
I want only the Month to be displayed.
Thank you,
Printable View
Hello I am working on a Report in SQL Server 2003
I have a text box showing the date:
textbox.Value =TODAY()
Please could some body tell me how I could display the date for just the previous month.
I want only the Month to be displayed.
Thank you,
You don't say how you're interfacing with SQL Server, but the following code (VB6) will display last month as a string, eg 'March'VB Code:
Dim LastMonth As Integer LastMonth = Month(Date) - 1 If LastMonth = 0 Then LastMonth = 12 End If MsgBox "Last month was " & MonthName(LastMonth)
you can also do it like this
VB Code:
Dim LastMonth LastMonth = Format(DateAdd("m", -1, Format(Now, "mm/dd/yy")), "mmmm")
This is a reporting Services Report project which I created in VS 2003
When I drag and drop a text box onto a report design.
Then Under properties
I want to be able to show the previous month name.
Please could somebody help
aren't you using vb?