Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
santizing-employeeenddate.vb
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
You can’t perform that action at this time.