Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can't seem to find the anser to this...
Any one know the QV syntax for Sql Server's DATEADD(m, -1,getdate())... ie today's date minus one month???
Thanks, Mike
Try this Addmonths(Date,-1)
-Sridhar
Thanks Sridhar...
By the way... how did you know that??? I couldn't find anything online / in the reference pdf / in the community...
This community is great but I'm desperate for a decent QV Bible to be published!
Cheers again... Mike
Mike, You could get this in this forum itslef. This has been discussed many times in this forum and other sources would be reference manual and Qlikview Help. Below is the content copied from Qlikview Help.
AddMonths(startdate, n , [ , mode] )
Returns the date occurring n months after startdate or, if n is negative, the date occurring n months before startdate.
By specifying a mode (0 if omitted) the date is set to either the unmodified day of the specified month (mode=0) or the calculated day as derived from the end of the month (mode=1).
Examples:
addmonths ('2003-01-29',3) returns '2003-04-29'
addmonths ('2003-01-29',3,0) returns '2003-04-29'
addmonths ('2003-01-29',3,1) returns '2003-04-28'
addmonths ('2003-01-29',1,0) returns '2003-02-28'
addmonths ('2003-01-29',1,1) returns '2003-02-26'
addmonths ('2003-02-28',1,0) returns '2003-03-28'
addmonths ('2003-02-28',1,1) returns '2003-03-31'
Great - It never even crossed my mind to look in help when I need help... nice one thanks...