Exporting DateTime attribute to FIM portal
Hi, I'm having some trouble exporting DateTime attributes into the portal with the FIM Service MA. My metaverse attribute is of type IndexedString and my portal attribute of type DateTime. The value that I'm trying to export is "1/15/1945 12:00 AM" (without the quotes). The export is failing with the error "datetime-string-format-incorrect" though I can manually insert the exact same string using the portal web interface. I read something about DateTime attribute issues in the Release Notes but it was supposed to be "exported-change-not-reimported" issues, not "datetime-string-format-incorrect". Any ideas ? Thanks in advance -- Joaquim
October 21st, 2009 8:26pm

Maybe this post could help you... http://social.technet.microsoft.com/Forums/en-US/ilm2/thread/d183831a-8db8-4fcb-ba3f-50025637ab2eHenrik Nilsson Blog: http://www.idmcrisis.com Company: Cortego (http://www.cortego.se)
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2009 8:45pm

I'm reading my values from a SQL data source. You can do something like this: case "cd.person:addatetime1,status->mv.person:employeeStartDate": // Set start date to be stored in FIM. if (!mventry["employeeStartDate"].IsPresent) { mventry["employeeStartDate"].Value = DateTime.Today.ToString("yyyy-MM-ddT" + "07:00:00.000"); } break; case "cd.person:termdate,status->mv.person:termDate": // Convert the termdate to a format supported by FIM. if (!csentry["termdate"].IsPresent) { mventry["employeeEndDate"].Value = String.Format("9999-12-31T" + "07:00:00.000"); } else { DateTime c = DateTime.Parse(csentry["termdate"].Value); mventry["employeeEndDate"].Value = c.ToString("yyyy-MM-ddT" + "07:00:00.000"); } break; Chris Calderon
October 21st, 2009 11:04pm

Chris is right, that should work if you have SQL Server as source otherwise you'll have to reformat the string to have the correct format including milliseconds in either a legacy import flow rule to MV or maybe it could work using workflow (authz before data is written to the Appstore). Unfortunately I don't have a working installation and can't test it. //HenrikHenrik Nilsson Blog: http://www.idmcrisis.com Company: Cortego (http://www.cortego.se)
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2009 10:27am

Thanks Chris this works great. Now the problem is to convert the datetime string to the right format. I'm gonna have to look deeper into the portal builtin functions to achieve that using codeless inbound rules. Thanks again Regards -- Joaquim
October 22nd, 2009 12:29pm

Use the builtin function DateTimeFormat:DateTimeFormat(HireDate,"yyyy-MM-ddTHH:mm:ss.000")This will convert a SQL DateTime attribute (HireDate) to the format the FIM portal wants it in.Thanks,Keith
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2010 9:11pm

In an Import Attribute Flow, DateTime termdate = DateTime.Parse(csentry["EndDate"].Value).ToUniversalTime(); mventry["EmployeeEndDate"].Value = System.Xml.XmlConvert.ToString(termdate, System.Xml.XmlDateTimeSerializationMode.Unspecified)+".000";Eric
February 23rd, 2010 9:30pm

Guys I'm feeling really dumb right now but what ever I try is not working. if i exclude date related attributes from the SQL MA the portal gets pupolated with data, no problem. If I add a date attribute ( employee start date eg) no matter which format I use it doesn't work. I'm not very clued up with the code solution I found in the other forum so a none code solution is most appreciated. If I click on one user profile under work info employee start date is flagged as "Format as yyyy/MM/dd hh:mm tt" I try to use the same change to the same format under the built in functions but I still get the same date-time error when I run the Sync Profiles
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2010 5:24pm

Guys after a bit of a trial and error got it working.Thanks a mil, a mil, a mil
October 5th, 2010 10:37pm

Hi, where i wrote this script of code please tell me. Thank,s
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2011 1:33am

This builtin function is not working properly so please tell me how to use this function. Thank,s in advance
August 5th, 2011 1:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics