Importing dates from Excel and using in scripted variables

Discussion created by Stu412 on Jul 24, 2018
Latest reply on Jul 24, 2018 by Stu412

I need to import a formatted date from MS Excel (DD/MM/YYYY) and then put this into a record in Filemaker.  Because of the nature of the source data, my process is this:


Run an short import script which puts the 'Date' information from Excel to a 'date' type field on a temp table.

Allow the end user an opportunity to edit the data on the temp table prior to 'live upload'.

Once the data is good, user presses 'Resume' and the data is uploaded to the live table.


I have a problem with the dates, which are all different per record.  My current scripted effort at getting these from the temp table (where they are visible), to the permanent table is:


Go to layout [Temp]

Set Variable ($StartingDate ; d_StartDate)

Go to layout [Live]

Set Field (Live::d_StartDate ; $StartingDate)


The destination field is never populated and I think the issue I'm having is a result of the requirement of variables to be a type 'text' and, despite the destination field being of a type 'date', it fails at this point.


What's the best way to either copy this data across successfully so that it's still recognised as a date after it's been a variable?


Thanks in advance