OT - convert notations
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
OT - convert notations
Hi, people.
Format 30304324-922355200 corresponds to date 2013-06-13 13:46
Format 30304315327317760corresponds to date 2013-06-13 13:36
Anyone has a clue on how I can convert any given date into such a format?
Thanks.
Format 30304324-922355200 corresponds to date 2013-06-13 13:46
Format 30304315327317760corresponds to date 2013-06-13 13:36
Anyone has a clue on how I can convert any given date into such a format?
Thanks.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: OT - convert notations
Can you tell us what software outputs such numbers?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
Sure - Offline CD Browser.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: OT - convert notations
Seems like some form of custom unit, and time is measured from a particular moment as offset, a-la NTFS.
9595037440 should be equal to 600 seconds / 10 minutes...
I recall having seen something similar in Winamp as total played time, however it is hex and far more incomprehensible. Didn't dig further...
9595037440 should be equal to 600 seconds / 10 minutes...
I recall having seen something similar in Winamp as total played time, however it is hex and far more incomprehensible. Didn't dig further...
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
There must be a hidden trick here as the second component of the first date is negative (so yes, there's definitely an offset point here!), despite it being 10 minutes later than the second date.
Any other hint is welcome, of course.
And Marco - thanks!
Any other hint is welcome, of course.
And Marco - thanks!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
A bit more digging revealed
27846585119715840", "1980-01-01 03:00"; // oldest date allowed by XY for timestamping*
292789892085056256", "1999-06-30 15:30";
29368158-148728064", "2000-09-15 21:50"; // why this has a "-"?
30051159-1406863360", "2010-01-02 03:00"; //...just like this?
30191372658629888", "2011-11-30 03:00";
30308179913686016", "2013-07-02 18:37";
The previous data from first post is incorrect as now I see that "created" and "last used" columns are written inversely on .cdb file. So yes, it seems to be an increasing factor here but how to write it correctly? And more hideous... what's the mechanism behind the "-" appearance?
_________________
*it can be done with
::timestamp m, "1979-12-31 23:59:58";
27846585119715840", "1980-01-01 03:00"; // oldest date allowed by XY for timestamping*
292789892085056256", "1999-06-30 15:30";
29368158-148728064", "2000-09-15 21:50"; // why this has a "-"?
30051159-1406863360", "2010-01-02 03:00"; //...just like this?
30191372658629888", "2011-11-30 03:00";
30308179913686016", "2013-07-02 18:37";
The previous data from first post is incorrect as now I see that "created" and "last used" columns are written inversely on .cdb file. So yes, it seems to be an increasing factor here but how to write it correctly? And more hideous... what's the mechanism behind the "-" appearance?
_________________
*it can be done with
::timestamp m, "1979-12-31 23:59:58";
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
Many thanks for the tip, Don!
Current developments concerning time precision left me wondering but I see no way to convert lpFileTime (dwLowDateTime, dwHighDateTime) into lpSystemTime and vice versa, using XY scripting. Is there a way? Can it be provided, in case of a negative?
Current developments concerning time precision left me wondering but I see no way to convert lpFileTime (dwLowDateTime, dwHighDateTime) into lpSystemTime and vice versa, using XY scripting. Is there a way? Can it be provided, in case of a negative?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: OT - convert notations
No. I would end up writing a wrapper around the whole Windows API, I'm not that crazy.
And, now that you know "Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)." what stops you from doing the math yourself. XY scripting has all the math functions you need.
And, now that you know "Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)." what stops you from doing the math yourself. XY scripting has all the math functions you need.
FAQ | XY News RSS | XY X
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
being "1980-01-01 00:00" (03:00 was an inaccuracy from the software which insists shifting 00h > 03h, can't tell why!) the oldest date allowed by XY for timestamping, I couldn't experiment on actual files the calc script I'd write. Not impossible, but certainly not as easy as if I'd be allowed toadmin wrote: ...what stops you from doing the math yourself. XY scripting has all the math functions you need.
::timestamp m, "1600-12-31 23:59:58";*
...can you give me a hand here...?
_________________
*provided the 1980's date it's NOT a fat32 limitation, of course.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: OT - convert notations
Why you say so, are you working on FAT? Because on NTFS I can correctly timestamp a file back to 1601 (and this music comes to my mind...)being "1980-01-01 00:00" (03:00 was an inaccuracy from the software which insists shifting 00h > 03h, can't tell why!) the oldest date allowed by XY for timestamping
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
Yes, it's impossible for me to do the guessing on dwLow/HighDateTime without day zero to start studies.
Marco, can you give a take on this, please? Yes, I'm stuck on a FAT 32 file system and can't reach NTFS for the next days.
Bear in mind: lpFileTime into lpSystemTime and vice versa.
...and your song reminds me this one: http://www.youtube.com/watch?v=g_M_LAMaf0w, which I refuse to listen to these days.
Marco, can you give a take on this, please? Yes, I'm stuck on a FAT 32 file system and can't reach NTFS for the next days.
Bear in mind: lpFileTime into lpSystemTime and vice versa.
...and your song reminds me this one: http://www.youtube.com/watch?v=g_M_LAMaf0w, which I refuse to listen to these days.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: OT - convert notations
Done!
I'll tell you tomorrow the workflow. Pretty straightforward, actually. Little warning, proper padding is essential. Meanwhile here are the steps:
http://www.wolframalpha.com/input/?i=30304315+to+bin
http://www.wolframalpha.com/input/?i=327317760+to+bin
http://www.wolframalpha.com/input/?i=00 ... 0100000000
http://www.wolframalpha.com/input/?i=13 ... 0+*+100+ns
https://www.youtube.com/watch?v=_q0BtURAj7Y
I'll tell you tomorrow the workflow. Pretty straightforward, actually. Little warning, proper padding is essential. Meanwhile here are the steps:
http://www.wolframalpha.com/input/?i=30304315+to+bin
http://www.wolframalpha.com/input/?i=327317760+to+bin
http://www.wolframalpha.com/input/?i=00 ... 0100000000
http://www.wolframalpha.com/input/?i=13 ... 0+*+100+ns
https://www.youtube.com/watch?v=_q0BtURAj7Y
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: OT - convert notations
Hm.
Errrrr...
Han...
I still can't see a way to convert those calculations into XY scripting, specially as (per my own initial observations and attempts) the farthest we could go is (like http://www.wolframalpha.com/input/?i=13 ... 0+*+100+ns clearly says) is a full amalgam of nanoseconds instead of a nice "2013-07-02 18:37" user readable format (not to mention the total lack of a clue on how to convert such date back into nanosecs!).
-and don't you dare to tell me that such conversion is 'pretty straightforward', right?
Strangely, that tune also reminds me Danny Boyle's Sunshine OST, a movie that was certainly made to be a full sensory experience.
Thanks for helping! Have a good nite.
Errrrr...
Han...
I still can't see a way to convert those calculations into XY scripting, specially as (per my own initial observations and attempts) the farthest we could go is (like http://www.wolframalpha.com/input/?i=13 ... 0+*+100+ns clearly says) is a full amalgam of nanoseconds instead of a nice "2013-07-02 18:37" user readable format (not to mention the total lack of a clue on how to convert such date back into nanosecs!).
-and don't you dare to tell me that such conversion is 'pretty straightforward', right?
Strangely, that tune also reminds me Danny Boyle's Sunshine OST, a movie that was certainly made to be a full sensory experience.
Thanks for helping! Have a good nite.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: OT - convert notations
It softened my heart, next version you can do this:
(not officially documented)
Code: Select all
formatdate([date], [format], [shift_unit], [shift_num], [flags])
flags: 1 = Date is FileTime ("high,low").
2 = Localize (UTC to local time).
Code: Select all
echo formatdate("30304324,-922355200",,,,3);FAQ | XY News RSS | XY X
XYplorer Beta Club