Sign in to follow this  
Followers 0
xtrim

Timestamp to numeric conversion

9 posts in this topic

Hi,

How do I convert a standard timestamp to its numeric representation?

Share this post


Link to post
Share on other sites



Any example? From xto y?


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

From which "standard" to which "numeric representation"?


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Hi,

for example

timestamp 13/04/2011 14:35:56 is represented as 40646.608287037

timestamp 30/04/2011 14:37:36 is represented as 40663.609444444

Share this post


Link to post
Share on other sites

Hi,

for example

timestamp 13/04/2011 14:35:56 is represented as 40646.608287037

timestamp 30/04/2011 14:37:36 is represented as 40663.609444444

I haven't seen yet this kind of date representation , you could try this :

it gives you a represenation like this : Tue, 12 Apr 2011 11:43:33 GMT is represented as 1302608613 just like mktime() form php check this .

Share this post


Link to post
Share on other sites

@xtrim,

None of your examples is anywhere close to "standard" and your terminology is backward.

A standard (ISO 8601) date-time (string) is something like 2011-04-12T13:56:23+01:00 (my own current time).

The equivalent Unix timestamp is 1302609878 (in fact, it's a few seconds later!).

So the standard Unix timestamp for 2011-04-13 14:35:56 is 1302705356 and 2011-04-30 14:37:36 gives 1304174256.

There is not even a constant proportion from the timestamp integers to the values you provide, so I question what they actually represent.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
Look like Ms-Excel Date-Time value's. or [DayCount(date).DayFraction(Time)] ... start point: "January 1, 1900"

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

tnx :unsure:

Share this post


Link to post
Share on other sites

Ah, you mean that! You should have said so before.

#include <Date.au3>
Local $msTime = _DateDiff('s', '1899/12/30 00:00:00', '2011/04/13 14:35:56') / 86400
ConsoleWrite($msTime & @LF)

If you wonder why 30/12/1899, it's because Excel mimics a bug introduced by Lotus 1-2-3 and Multiplan which wrongly assumed the year 1900 to be leap.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0