Jump to content

Subtracting Dates


Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...