santizing-employeeenddate.vb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Case "employeeEndDate-CDRMA-PA-Import" | |
'CDR attributes required are: EndDate | |
'Code to define the employeeEndDate in the MV and Portal - needs to be in the correct format! | |
Dim dtFileTime As DateTime | |
If csentry("EndDate").IsPresent Then | |
dtFileTime = DateTime.Parse(csentry("EndDate").Value).Date | |
'Convert to the date/time string format that the Portal requires: | |
Dim employeeEndDate As String = dtFileTime.ToLocalTime.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.000'") | |
Dim arremployeeEndDate As String() = Split(employeeEndDate, "T") | |
employeeEndDate = arremployeeEndDate(0) & "T23:59:59.000" | |
mventry("employeeEndDate").Value = employeeEndDate | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment