Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems with Variable

Why do I get a error on this one in QV 8.5 ? Anyone got some other idea of writing the first day of last month in the following date format 01-mar-2009?

LET ToMonth=left(date(monthstart(TODAY(),-1),'DD-MM-YYYY'),2) && '-' && month(date(monthstart(TODAY(),-1),'DD-MM-YYYY')) && '-' && right(date(monthstart(TODAY(),-1),'DD-MM-YYYY'),4)

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Another way of getting the first day of the previous month compared to todays date is this:

LET ToMonth = monthstart(addmonths(Today(),-1));

View solution in original post

3 Replies
Not applicable
Author

I found the answer. So stupid! forgot the ;

Anonymous
Not applicable
Author

Another way of getting the first day of the previous month compared to todays date is this:

LET ToMonth = monthstart(addmonths(Today(),-1));

Not applicable
Author

Thanks!