Sign in to follow this  
Followers 0
dickep

datediff not working for me

3 posts in this topic

Ah, yes, I cannot see the forest for the trees.

I have this code and cannot get it to work. Maybe someone else can point out my "mistake" as I cannot see it - staring too long makes one want to drink heavily but then you cannot see it anyway.

Thanks

#include <Date.au3>

$mEPTime = "2010/04/12 17:43:30"

$mCollectedTime = "2010/04/12 17:43:18"
MsgBox(0,"End read", " starting time " & $mEPTime & "    ending time " & $mCollectedTime)
$mDeltaT = _datediff('s', $mEPTime, $mCollectedTime)
if @error > 0 Then
    MsgBox(0,"","ERROR #: " & @error)
EndIf
MsgBox(0,"","Time difference", $mDeltaT)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

bang your head against the wall:

MsgBox(0,"","Time difference: " & $mDeltaT)

You might change start date and end date as well, as you get minus seconds (see helpfile _DateDiff).

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

See, there is a forest, just can't tell what the trees are doing to me.

Thanks for pointing this out - works fine. Need new glasses I guess.

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