I done some "magic" with the time and date when a event is being moved or re-scheduled. So in the beginning of the Create Edit Delete Event I save the original data and in the end of the script, if a error occur I save the old time.
Its like this in the beginning:
Set Variable [$Time_Start ; Get ( Data::Time_Start ) ]
And this after the error occur:
Set field [ Data::Time_Start ; $Time_Start ]
In the beginning, when the variable being added the Data::Time_Start-felild i have 2016-08-03, therefore the $Time_Start get the same data. But after the set field we have a "?" in the Data::Time_Start.
If i try to use GetAsDate ( $Time_Start ) it also will resault in "?".
If i use the Get ( CurrentDate) function it will give me" 8/2/2016".
Is there a way to change DayBack to handel European styled dates or another smart way to get around this problem.
US vs European date
4 posts
• Page 1 of 1
Posts: 5
Joined: Mon Jul 25, 2016 11:20 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi Ronny,
If I'm following you correctly, I think you want to capture the timestamp as number fields that you added for DayBack instead of FileMaker's native date fields: when native date fields are set to text (as they sometimes are when captured as variables) they use the date format the FileMaker file was created in. There is no way to reset this formatting outside of cloning the file. And this is why we DayBack uses date-as-numbers instead. So at the beginning of your script try: Set Variable [$Time_Start ; Get ( Data::DBk_TimestampStartCalcNum ) ] And then when you're done... Set field [ Data::Date_Start ; GetAsDate ( GetAsTimestamp ( GetAsNumber ( $Time_Start ) ) ) ] Set field [ Data::Time_Start ; GetAsTime ( GetAsTimestamp ( GetAsNumber ( $Time_Start ) ) ) ] Hope that helps, John John Sindelar
SeedCode |
Posts: 5
Joined: Mon Jul 25, 2016 11:20 am |
Of corse, getAsNumber, what a livesaver!
Thanks for the quick help! |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
> what a livesaver!
No doubt. =) John Sindelar
SeedCode |
4 posts
• Page 1 of 1
Return to DayBack Calendar for FileMaker
Who is online
Users browsing this forum: No registered users and 3 guests