Meleh Posted January 25, 2016 Share Posted January 25, 2016 Hello, I'm very new to the programming and to Autoit. I tried to find way to convert date to 18 digits windows Tmestamp. I found this web site to do so: http://www.epochconverter.com/epoch/ldap-timestamp.php For example: Today: 25/01/2016 00:00 = 130981536000000000 But i couldn't find any function in Autoit. Someone have function or ideas how to do it ? Thanks !!! Link to comment Share on other sites More sharing options...
Meleh Posted January 25, 2016 Author Share Posted January 25, 2016 I've found this: #include <Date.au3> $exampleADTimeStamp = "130981536000000000" ConsoleWrite(_DateAdd("s", StringTrimRight($exampleADTimeStamp, 7), "1601/01/01 00:00:00") & @CRLF) This function transforms timestamp to date, but how do I transform date to timestamp ? Link to comment Share on other sites More sharing options...
water Posted January 25, 2016 Share Posted January 25, 2016 Here you find some date related functions (VBS). My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
mikell Posted January 25, 2016 Share Posted January 25, 2016 #include <Date.au3> $date = "2016/01/25 00:00:00" $t = _DateDiff("s", "1601/01/01 00:00:00", $date) & "0000000" ConsoleWrite( $t & @CRLF) $t = _DateDiff("s", "1601/01/01 00:00:00", _NowCalc()) & "0000000" ConsoleWrite( $t & @CRLF) Meleh 1 Link to comment Share on other sites More sharing options...
Meleh Posted January 25, 2016 Author Share Posted January 25, 2016 3 hours ago, mikell said: #include <Date.au3> $date = "2016/01/25 00:00:00" $t = _DateDiff("s", "1601/01/01 00:00:00", $date) & "0000000" ConsoleWrite( $t & @CRLF) $t = _DateDiff("s", "1601/01/01 00:00:00", _NowCalc()) & "0000000" ConsoleWrite( $t & @CRLF) Thank You, Very simple and helpfull! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now