DESCRIPTION
This little function converts regular date (i.e. 04/01/1980) into integer8 value which is the number of seconds since 1/1/1601. This number is used to set the account Expiration date in AD.
Note This code may use functions from the Active Roles Script Policy Best Practices. Please, follow the link to obtain instructions and code for those functions.
SCRIPT
'*********************************************************************************
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT ONE IDENTITY PROFESSIONAL SERVICES.
'*********************************************************************************
Function getInteger8Date(strDate)
strDateDiffSeconds = DateDiff("s",#1/1/1601#,strDate)
strDateDiffSeconds = strDateDiffSeconds + 172800 'For some reason need to add two days back...
strResult = Cstr(strDateDiffSeconds) & "0000000"
getInteger8Date = strResult
End Function
'***** END OF CODE ***************************************************************