-
Notifications
You must be signed in to change notification settings - Fork 36
DateTimeToFileTimeUTC Function
int? DateTimeToFileTimeUtc(date:DateTime)
Converts a date in the Windows file time format.
The only known use of this function is to set AD account expiration date/time which is a big integer. Thus, if you get a datetime value, e.g. EmployeeEndDate, you need to convert it to big int to expire an account.
If the first input parameter (date) is null, the function returns a null value.
2.15.623.0 and later
It's very common to have EmployeeEndDate attribute populated with the last working day, not with a termination date. Therefore, you might want to add one extra day to expire an account a day after the end date. The expression below adds one day to employee's end date and converts the result into big int.
DateTimeToFileTimeUTC(DateTimeAdd([//Target/EmployeeEndDate],1))
Mind that if employee's end date contains only date (no time part with HH:mm:ss) then resulting big int value might be a little bit different with the one you set using AD Users and Computers tool because of the time zone, as all the dates are kept in GMT in FIM/MIM Service
- MIMWAL Site - http://aka.ms/MIMWAL
- MIMWAL Releases - http://aka.ms/MIMWAL/Releases
- MIMWAL Documentation Wiki - http://aka.ms/MIMWAL/Wiki
- MIMWAL FAQ - http://aka.ms/mimwal/faq
- MIMWAL GitHub Code Repo - http://aka.ms/MIMWAL/Repo
- MIMWAL TechNet Q&A Forum (now read-only) - http://aka.ms/MIMWAL/Forum