DateTimeToFileTimeUTC Function

Eugene Sergeev edited this page Jan 10, 2016 · 4 revisions


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.

Supported Version

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.


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

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.