Jump to content

inputbox that only accept time?


Recommended Posts

This is a part of one of my script

........

$start = GUICtrlCreateInput("", 50, 22, 120, 21)

GUICtrlSetData(-1, "00:00")

.......

I only want to be able to type in a time, like 18:20, because later I use the time with a _DateDiff so it needs to be written in that way.

I can't use $es_number because of the ":" and I it would look stupid if I wrote 1820 and later use stringsplit to get the time.

Link to comment
Share on other sites

thanks, I changed the $DTS_SHORTDATEFORMAT to $DTS_TIMEFORMAT and removed the second line since I only wanted the time and your script returned with the day "6" because it's 6 june.

btw is it possible to remove the up and down arrow?

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...