March 28, 2013 at 5:23 am
hi
I wanted to put a parameter by default DATE of yesterday?
How do I create the Format
March 28, 2013 at 6:06 am
Here is a list of the popular date calculations:
First Date of last month: =Format(DateAdd("m", -1, DateSerial(Year(Now()), Month(Now()), 1)),"dd/MM/yyyy")
Last date of last month: =Format(DateAdd("d", -1, DateSerial(Year(Now()), Month(Now()), 1)),"dd/MM/yyyy")
First date of current month: =Format(DateSerial(Year(Now()), Month(Now()), 1),"dd/MM/yyyy")
Last date of current month: =Format(DateAdd("d",-1,(DateAdd("m", 1, DateSerial(Year(Now()), Month(Now()), 1)))),"dd/MM/yyyy")
Yesterday's date : =Format(DateAdd("d", -1, now()),"dd/MM/yyyy")
tomorrow's date : =Format(DateAdd("d", 1, now()),"dd/MM/yyyy")
March 28, 2013 at 6:30 am
I do the following process
Parameter Properties --> Default Values --> Specify Values --> add --> fx --> =Format(DateAdd("d", -1, now()),"dd/MM/yyyy") --> ok
When I Preview gives this error
an error occurred during local report processing.
The property 'DefaultValue' of report parameter 'DateDe' doesn't have the expected type
What is the problem?
March 28, 2013 at 8:11 am
What happens if you wrap the expression in the CDate function? Like:
=CDate(Format(DateAdd("d", -1, now()),"dd/MM/yyyy"))
March 28, 2013 at 8:53 am
Already works. Thank you
March 28, 2013 at 9:01 am
Glad you got it working! Thanks for letting us know.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply