Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there
I am currently trying to make a data field for a variable, the following scrip returns null()
= MakeDate(
(Year( MonthStart( Today()-15 ) -1 ) ),
(num( Month( MonthStart( Today()-15 )-1 ) ) ),
(Day( MonthEnd( Today()-15 ) -1 ) )
)
What am I doing wrong here?
/Teis
hi Max
Thanks for reply
I get I now. With your help and understanding I fixed it thanks again.
Year( MonthStart( Today()-15 ) -1 ),
num( Month( MonthStart( Today()-15 )-1 ) ),
and Day( MonthStart( Today()-15 ) -1 )
/Teis
Hi,
as far as I can see, that >> Monthstart(Today()-15) << part is wrong - that is supposed to return the start of the month 15 months back, no? There has to be a separating comma - >> Monthstart(Today(), -15) <<
Try that.
It's always a good method to test individual parts of your formula in textboxes on the GUI before you try it in the script.
HTH
Hi,
You are trying to create such date which is not available in year therefore it is giving you -
Regards
Hi DataNibbler
thanks for a fast reply.
I have tried every individual part and the result is:
It have worked before but suddenly the application fails to run.
/Teis
Hi,
Your first expression
Year( MonthStart( Today()-15 ) -1 ) returning 2015
num( Month( MonthStart( Today()-15 )-1 ) ) return 2
and Day( MonthEnd( Today()-15 ) -1 ) return 30
therfore date 2015-2-30
which is not possible
Regards
hi Max
Thanks for reply
I get I now. With your help and understanding I fixed it thanks again.
Year( MonthStart( Today()-15 ) -1 ),
num( Month( MonthStart( Today()-15 )-1 ) ),
and Day( MonthStart( Today()-15 ) -1 )
/Teis