Automatic convert eTCreateDate and eTCreateTime
search cancel

Automatic convert eTCreateDate and eTCreateTime


Article ID: 39054


Updated On:


CA Identity Manager CA Identity Governance CA Identity Portal CA Risk Analytics CA Secure Cloud SaaS - Arcot A-OK (WebFort) CLOUDMINDER ADVANCED AUTHENTICATION CA Secure Cloud SaaS - Advanced Authentication CA Secure Cloud SaaS - Identity Management CA Secure Cloud SaaS - Single Sign On


The attribute eTCreateDate and eTCreateTime contain odd numerical values (see TEC doc TEC524458 for a description of the layout)
Using manual means to “decrypt” the values can be cumbersome
One of our client (Evry) created a powershell script that does this and they have allowed us to share this.


Release: CAIDMB99000-12.6.7-Identity Manager-B to B


Use an editor (notepad or your preferred editor) and create the file “get_eT_date_time.ps1”
Copy in the following to the file:

# 20160106 v1  Evry
# returns Human readable time date of eTCreateTime and eTCreateDate
# eks: .\get_eT_date_time.ps1 -eTCreateTime 0004107500 -eTCreateDate 0000110013
    [Parameter(mandatory=$true)][string] $eTCreateTime,
    [Parameter(mandatory=$true)][string] $eTCreateDate
$ts =  [timespan]::fromseconds($seconds)
$tod="{0:hh:mm:ss}" -f ([datetime]$ts.Ticks)
write-host ([datetime]"01/01/$($year)").AddDays($day-1).ToShortDateString() " $tod"

To run it, use for example

powershell -file get_eT_date_time.ps1 -eTCreateTime 0004107500 -eTCreateDate 0000110013


Additional Information