add a day to a current date
I use this syntax, but seems not working.
Day(Get(CurrentDate)) + 1,
Also I have to create a +7 days, +30 days and +4 hours
Where is the error?
Set Field [ YourTable::yourField ; Get(CurrentDate)+1 ]
( your script is wrong: a) you do not need to go to a field to set it; b) you had inserted the calculation in the wrong place )
Also this not working
Day(Get(CurrentDate) + 1), Month(Get(CurrentDate)), Year(Get(CurrentDate)) )
or this one
Date( Day(Get(CurrentDate)) + 89400, Month(Get(CurrentDate)), Year(Get(CurrentDate)) )
The Date ( ) function has 3 parameters, but NOT in the order that you wrote !
Also, to add a day to the current date, you could simply use:
Get ( CurrentDate ) + 1
thank you raybaudi
Easy solution, but unfortunately not working.
The +1 is not added at the date.
Where did you use that calculation?
If in a calc field, the result must be date type and UNSTORED.
I use this command into a script.
I have a button in a date/time field and if the button is pressed a new date is written.
Consider that now is 27
If the field contain a date like 20, if I press the button "tomorrow" the result must be 28 but filemaker give to me only 27
I also tryed to place a value in seconds, like 89400
Please, write here the actual script. ( BTW 20 isn't a date )
the script is like this:
go to field XYZ
insert current date [Select; XYZfield[Get(CurrentDate)+1]]
A similar script, for another button, works perfectly and is like this:
go to field XYZ
Insert current date [select; XYZfield]
Your last solution works, raybaudi.
How can I also add time?
Where? In a timestamp field or in a time field?
Same field, is datetime. Sorry if I'm not too precise, but my filemaker is localized to italy and change every command from english to italian
Ops. Done. Thank you for your help. Very precious.
Have a nice day!
I'm from Italy too!
Ciao. Dal nome pensavo fossi indiano.
Grazie, veramente molto utile.
Retrieving data ...