randallc Posted March 13, 2006 Posted March 13, 2006 Hi, Does anyopne have an idea how to get an MSAccess datum wich is a date-time/; result comes back as "33456.76589" etc as a detailed Julian-type number, and I want it as not only date, but the time component? I guess I can write a routine to do this, but I wonder if there is an easy command in autoIt, or if I can retrieve it from Access already converted? thanks, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Moderators big_daddy Posted March 13, 2006 Moderators Posted March 13, 2006 Maybe this will get you started:How to Convert Julian Days to Dates in Access and Back
Developers Jos Posted March 13, 2006 Developers Posted March 13, 2006 This should be close ... the date calculation needs some more testing #include<date.au3> $Input_date = 33456.76589 $date_part = Int($Input_date) ; Global $iYear,$iMonth, $iDay Global $Base = _DateToDayValue(1900,01,01) - 1.5 _DayValueToDate($date_part+$Base,$iYear,$iMonth, $iDay) $Date = $iMonth & "/" & $iDay & "/" & $iYear ConsoleWrite('@@ Debug(7) : $Date = ' & $Date & @lf & '>Error code: ' & @error & @lf);### Debug Console $time_part = int(($Input_date - $date_part) * 24 * 60 * 60 *1000) Global $iHH,$iMM, $iSS _TicksToTime($time_part,$iHH,$iMM,$iSS) $time = $iHH & ":" & $iMM & ":" & $iSS ConsoleWrite('@@ Debug(15) : $time = ' & $time & @lf & '>Error code: ' & @error & @lf);### Debug Console SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
randallc Posted March 13, 2006 Author Posted March 13, 2006 (edited) Hi,That was quick!Thanks to both; I'll have a look..Best, RandallPSHow to Convert Julian Days to Dates in Access and Back that link only talks about the Date component, which is easy in AutoIt anyway.. Edited March 13, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
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