If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date query
I wanting to show the date as last day of the previous month from [InvoivceDate] in my text box =Format([InvoiceDate],"dd-mmm-yyyy") -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 |
#2
|
|||
|
|||
Date query
Bob
To get the last day of the previous month, there's a trick you can use with the DateSerial() function. By using the "0" (zero-th) day of THIS month, Access will determine the last day of last month. Your expression might look something like: DateSerial(Year(Date()), Month(Date(), 0) This will use today's date (the Date() function) to get the year and month of today's date, then step back to the last day of the previous month. Regards Jeff Boyce Microsoft Office/Access MVP "Bob Vance" wrote in message ... I wanting to show the date as last day of the previous month from [InvoivceDate] in my text box =Format([InvoiceDate],"dd-mmm-yyyy") -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 |
#3
|
|||
|
|||
Date query
Thanks Jeff , can i use ([InvoiceDate]) for this code in my text box on a
Report Regards Bob "Jeff Boyce" wrote in message ... Bob To get the last day of the previous month, there's a trick you can use with the DateSerial() function. By using the "0" (zero-th) day of THIS month, Access will determine the last day of last month. Your expression might look something like: DateSerial(Year(Date()), Month(Date(), 0) This will use today's date (the Date() function) to get the year and month of today's date, then step back to the last day of the previous month. Regards Jeff Boyce Microsoft Office/Access MVP "Bob Vance" wrote in message ... I wanting to show the date as last day of the previous month from [InvoivceDate] in my text box =Format([InvoiceDate],"dd-mmm-yyyy") -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 |
#4
|
|||
|
|||
Date query
On Wed, 5 Nov 2008 14:21:50 +1300, "Bob Vance" wrote:
Thanks Jeff , can i use ([InvoiceDate]) for this code in my text box on a Report If you want the last day of the month prior to InvoiceDate, use =DateSerial(Year([InvoiceDate]), Month([InvoiceDate]), 0) This will give September 30 if run on October 31... not clear if that's what you want! -- John W. Vinson [MVP] |
#5
|
|||
|
|||
Date query
Brilliant thanks John
"John W. Vinson" wrote in message ... On Wed, 5 Nov 2008 14:21:50 +1300, "Bob Vance" wrote: Thanks Jeff , can i use ([InvoiceDate]) for this code in my text box on a Report If you want the last day of the month prior to InvoiceDate, use =DateSerial(Year([InvoiceDate]), Month([InvoiceDate]), 0) This will give September 30 if run on October 31... not clear if that's what you want! -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|