Convert datatime column to 18-digit LDAP timestamp

91
January 25, 2021, at 00:00 AM

I have a csv file with AD users and their accountExpires attribute. The accountExpires values are currently in human readable format, but I want to convert it into 18-digit LDAP format so that I can import the file to change the date. I am using pandas to read and modify the file before importing.

Date time in the file - 2001-06-21  01:00:00 AM
Desired output - 126375588000000000
Answer 1

11644473600 = number of seconds between Jan 1601 and Jan 1970 (unix time) multiplied by 10000000 to convert it to 100ns unit

import datetime
df['LDAP'] = df['datetime'].apply(lambda x: (((x-datetime.datetime(1970,1,1)).total_seconds())+11644473600)*10000000)
READ ALSO
cant get data from form to server - MERN

cant get data from form to server - MERN

im new and i cant get data from the form in server to insert it in the DB, heres the code:

98
How to store and deal with big chuncks of text between Javascript and HTML

How to store and deal with big chuncks of text between Javascript and HTML

So , I'm using HTML , css and JavaScript, I did a form , where the user will give different data, like name , adress , ID number , etc and I want to introduce those values into a preformatted text (like a renting contract)

60
Blinking Text If checkbox is checked to true

Blinking Text If checkbox is checked to true

I am trying to create when user check checkbox to yes(true) in Index Page Emergency column needs to flash text something like Emergency But unfortunately I try couple of methods but unsuccessfullyHere is so far what I did

66