Passing on dates to External Layout screws up date formats

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 3
Joined: Mon Jul 10, 2017 2:43 am
PostPosted: Thu Aug 10, 2017 3:24 am
I have created my own layout to View details in the agenda.

I was working on it intensively day before yesterday (8 Aug), and didn't have much of a problem then (After reading the rest, imagine the odds!!)
Today I resume (10 Aug), and now I notice the date format passed along is not following your settings...

Some info:
  • My Filemaker 16 Pro & Advanced are set in Dutch language, and they connect to FMS16, where your solution is hosted.
  • In "Load Calendar settings - ..." line 126 $$sc_DateFormat is set to DD/MM/YYYY

I create an entry on today, and for me that's formatted as "10/8/2017"
  • When my script receives the params, the $sc_DateStart and $sc_DateEnd read "8/10/2017", thus placing the entry on 8th October...
What's up here?
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Fri Aug 11, 2017 9:51 am
Hi Wimmmmm,

Sorry to hear you're experiencing a date issue. Take a look at our Date Format documentation here for information: https://www.seedcode.com/pmwiki/index.p ... ateFormats

You might want to clone the file, as described in the documentation, so that your file's date formats are in your local date format.

Hope that helps!

Thanks,

KC
Posts: 3
Joined: Mon Jul 10, 2017 2:43 am
PostPosted: Mon Aug 21, 2017 5:19 am
Hi,

Cloning the file actually helps. Thanks!

But then I need to do quite some digging myself:
* re-create the filters (by re-importing from the orig file)
* check string translations & re-import
Maybe you could add that to the manual page.

I do like your solution - a lot - but it also gives me quite some overhead.
I do hope this doesn't occur too often...
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Mon Aug 21, 2017 10:40 am
Hi Wimmmmm,

It's good to hear that worked for you. Unfortunately, if you've already customized some filters and scripts, then you're right, those might need to be re-imported with the correct date formats.

One way to avoid this in the future is to convert your dates to a number using GetAsNumber() before passing them as a script parameter, then converting them back to a date using GetAsDate() when using them in the receiving script. This way, the result is always in the date format of your system.

Regards,

KC

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 4 guests

cron
(855) SEEDCODE
[email protected]
Follow us: