Page 1 of 1

Passing on dates to External Layout screws up date formats

PostPosted: Thu Aug 10, 2017 3:24 am
by Wimmmmm
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?

Re: Passing on dates to External Layout screws up date forma

PostPosted: Fri Aug 11, 2017 9:51 am
by kcembrey
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

Re: Passing on dates to External Layout screws up date forma

PostPosted: Mon Aug 21, 2017 5:19 am
by Wimmmmm
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...

Re: Passing on dates to External Layout screws up date forma

PostPosted: Mon Aug 21, 2017 10:40 am
by kcembrey
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