Jury Posted April 9, 2018 Posted April 9, 2018 (edited) So I get: $aMatch[0] Date(1499295600000) this is supposed to be 06 Jul 2017 $aMatch[0] Date(1483574400000) this is supposed to be 05 Jan 2017 does anybody know the formula to calculate the date from the large number? It doesn't seem to be anything to do with DateToDayValue. thanks in advance. Edited April 9, 2018 by Jury
BrewManNH Posted April 9, 2018 Posted April 9, 2018 Where is this number coming from? It's almost, but not quite, the number of seconds since Epoch time (1970/01/01 00:00:00) but with too many zeros. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Jury Posted April 9, 2018 Author Posted April 9, 2018 Is there a formula? (not that I'd understand it) I see in the script there is: "dateTimeFormat":{"AMDesignator":"AM","AbbreviatedDayNames":["S","M","T","W","T","F","S"],"AbbreviatedLeapMonthNames":null,"AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"Calendar":{"AlgorithmType":1,"CalendarType":1,"Eras":[1],"IsReadOnly":false,"MaxSupportedDateTime":"\/Date(253402300799999)\/","MinSupportedDateTime":"\/Date(-62135596800000)\/","TwoDigitYearMax":2029},"CalendarWeekRule":2,"DateSeparator":"\/","DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"FirstDayOfWeek":1,"FullDateTimePattern":"dd MMMM yyyy hh:mm tt","IsReadOnly":true,"LeapMonthNames":null,"LongDatePattern":"dd MMMM yyyy","LongTimePattern":"hh:mm tt","MonthDayPattern":"d MMMM","MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"NativeCalendarName":"Gregorian Calendar","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'","ShortDatePattern":"dd\/MM\/yyyy","ShortTimePattern":"hh:mm tt","ShortestDayNames":["S","M","T","W","T","F","S"],"SortableDateTimePattern":"yyyy'-'MM'-'dd'T'HH':'mm':'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy'-'MM'-'dd HH':'mm':'ss'Z'","YearMonthPattern":"MMMM yyyy","eras":[1,"A.D.","AD",0]} oh boy!
Jury Posted April 9, 2018 Author Posted April 9, 2018 (edited) Thanks @BrewManNH for the lead - I've found this using your information: https://currentmillis.com/ Edited April 9, 2018 by Jury
Jury Posted April 9, 2018 Author Posted April 9, 2018 and now I've found it! AutoIT _DateAdd("s", $EpochSeconds , "1970/01/01 00:00:00")
Jury Posted April 9, 2018 Author Posted April 9, 2018 now - how to use it for $EpochSeconds to human readable date?
Earthshine Posted April 9, 2018 Posted April 9, 2018 there is a nice search tool on the forum My resources are limited. You must ask the right questions
Jury Posted April 9, 2018 Author Posted April 9, 2018 So there is thank you - of course initially I didn't know 'unix' or 'epoch' etc.
Earthshine Posted April 9, 2018 Posted April 9, 2018 (edited) right. it always comes down to asking the right questions. you can always start somewhere and make progress, then refine your search. It's all about clear, clean and concise information, and the efficient and effective dissemination of said information communicated to others. You should always put time and effort into making your questions as clear as possible. Include your source code with an explanation of what is not working. In these ways you will be rewarded with the right answers more quickly. Edited April 9, 2018 by Earthshine My resources are limited. You must ask the right questions
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