Sign in to follow this  
Followers 0
Tigerweld

Subtracting Dates

2 posts in this topic

I am stumped. I need to be able to subtract two dates and have the results in hours.

#include <GuiConstantsEx.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>

; Create GUI
$hGUI = GUICreate("DateTimePick", 400, 300)
$hDTP = _GUICtrlDTP_Create($hGUI, 10, 10, 250)
GUISetState()

; Set the display format
_GUICtrlDTP_SetFormat($hDTP, "ddd MMM dd, yyyy hh:mm ttt")


; Create GUI
$hDTP = _GUICtrlDTP_Create($hGUI, 10, 50, 250)
GUISetState()

; Set the display format
_GUICtrlDTP_SetFormat($hDTP, "ddd MMM dd, yyyy hh:mm ttt")


; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

Share this post


Link to post
Share on other sites



I believe the _DateDiff UDF will do this for you.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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