
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 12:01 PM
Has anyone experienced Dates not importing correctly. I've tried this both with the typical import set/transform map and the new spiffy way to import in Dublin with the Excel template that is offered. What happens is this:
I have my original excel file. 7 columns. After everything in imported on the 'review' page, the date is in the field and looks great. See screen shot:(Please ignore the error, that is for another field that has 1 errant value.
The date field shows up correctly. As soon as I hit the 'Complete Import', it finalizes, and on the table...every date field is blank. Our system is setup with YYYY-MM-dd, that field is strictly a date field, with no time. I've attempted to go into transform map, and change the date format there, I've tried changing the format on the original excel file I'm using to import the data.
I've looked in the error logs and there are errors for pretty much every record on the date format with something similar to:
com.glide.db.impex.transformer.TransformCoercionException: Unable to format 2020-12-11 using format string yyyy-MM-dd hh:mm:ss for field u_next_review_date
or
com.glide.db.impex.transformer.TransformCoercionException: Unable to format 2020-12-11 using format string yyyy-MM-dd for field u_next_review_date
I've tried a few things I've found on the community, like changing the date format on the transform map, but so far nothing is working? Any suggestions? Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 01:37 PM
You're importing a date into a date/time field. In your transform map, go to the u_next_review_date field mapping. There should be a field on the left side of the form called 'Date Format'. Click on the lightbulb next to it. You should see a list of date formats. Choose the one that matches your data (ie YYYY-MM-DD). Reprocess the import set and transform. That should take care of your problem.
Failing that, you can just hardcode the fix by adding a time onto your string. Check source script and use something like this:
var date = source.u_next_review_date.toString();
answer = date + "00:00:00";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 01:37 PM
You're importing a date into a date/time field. In your transform map, go to the u_next_review_date field mapping. There should be a field on the left side of the form called 'Date Format'. Click on the lightbulb next to it. You should see a list of date formats. Choose the one that matches your data (ie YYYY-MM-DD). Reprocess the import set and transform. That should take care of your problem.
Failing that, you can just hardcode the fix by adding a time onto your string. Check source script and use something like this:
var date = source.u_next_review_date.toString();
answer = date + "00:00:00";

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 11:38 AM
Super Sweet! Thanks, this worked like a charm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2015 03:33 AM
Did you use the hardcode way? If yes then can you post which place it is?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2015 08:20 AM
Hi Hai
I did not use the hard code method, I just changed the 'Date Format' on the perticular field I was having issues to to 'YYYY-MM-DD' and that fixed the issue. The way that prdelong above mentioned to do it was clicking into the field you want to change, and for hard-coding select the 'Use Source Script' and then put in what he has.
One other method I've used before, which I'm not sure which is more efficient, but it has worked for me is from the actual Transform Map Main page, select 'run script'
and in the script do something like : target.<<yourtargetfield>>.toSring() = source.<<yoursourcefield>> + " 00:00:00";
I would try one of these two methods if you can't get it to work with just changing the date format from the record