Jump to content
Sign in to follow this  
Tigerweld

Subtracting Dates

Recommended Posts

Tigerweld

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
somdcomputerguy

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.