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
|
|||
|
|||
Subtract Now() - 6 months
Help please. Would like to take Expr2: Now() - Value
Value would be 6 for six months. Like the result written in regular Date Time. Thanks, Tony |
#2
|
|||
|
|||
Subtract Now() - 6 months
Use the DateAdd function
DateAdd("m",-6,Date()) will give you the date six months prior to today's date. -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County .. "Tony Ramirez" wrote in message ... Help please. Would like to take Expr2: Now() - Value Value would be 6 for six months. Like the result written in regular Date Time. Thanks, Tony |
#3
|
|||
|
|||
Subtract Now() - 6 months
On Tue, 20 Feb 2007 13:45:13 -0800, Tony Ramirez
wrote: Help please. Would like to take Expr2: Now() - Value Value would be 6 for six months. Like the result written in regular Date Time. Thanks, Tony The DateAdd() function will do this for you: DateAdd("m", -[Value], Date()) I'd use Date() rather than Now() because Now() returns the current date and time, accurate to a few microseconds; you probably don't need that level of precision for six months ago! John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|