Sign in to follow this  
Followers 0
SaTan

_DateDiff In contrast function

4 posts in this topic

Calculation of a cross-century the number of seconds

_DateDiff( 's',"1970/01/01 08:00:00","2006/12/12 13:10:00")

Do not know what function can calculate the number of seconds to date

know please help me

thank

Share this post


Link to post
Share on other sites



Hi,

Not sure what problem you are having?

This code works:

#include <Date.au3>

$date_from = "1970/01/01 00:00:00";EPOCH
$date_now = "2006/12/12 13:10:00"

$diff = _DateDiff ("s", $date_from, $date_now)

MsgBox (0, "", $diff & " seconds since " & $date_from)

Cheers,

Brett

Share this post


Link to post
Share on other sites

#include <Date.au3>

$date_from = "1970/01/01 00:00:00";EPOCH

$date_now = "2006/12/12 13:10:00"

$diff = _DateDiff ("s", $date_from, $date_now)

MsgBox (0, "", $diff & " seconds since " & $date_from)

Against

seconds since to Date

Examples

#include <Date.au3>

$date_from = "1970/01/01 00:00:00";EPOCH

$date_now = "1165929000"

$date =??("??,$date_from, $date_now)

MsgBox (0, "", $date_from & " seconds since to Date" & $date)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Please ask again in English that I can actually understand!

Thanks,

Brett

EDIT:

Actually do you mean...

#include <Date.au3>

$date_from = "1970/01/01 00:00:00";EPOCH
$date_now = "2006/12/12 13:10:00"

$diff = _DateDiff ("s", $date_from, $date_now)

MsgBox (0, "", $diff & " seconds since " & $date_from)

$date_since = _DateAdd ("s", 0-$diff, $date_now)

MsgBox (0, "", $date_since)
Edited by BrettF

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