Jump to content

Date picker


Gogi02
 Share

Recommended Posts

First of all sorry for my not so perfect english. What I'd like to do is program a date picker where user is presented with a box where he can enter numbers and function automatically converts it to date format. For example user would enter 01072010 and program would convert it to date format like 01.07.2010. Unfortunately I have no Idea how to do it. Could someone please point me in the right direction?

Link to comment
Share on other sites

We've got better than that... Built in :mellow: (sort of)

#include <GuiDateTimePicker.au3>

; Create GUI
Local $hGUI = GUICreate("DateTimePick", 400, 300)
Local $hDTP = _GUICtrlDTP_Create($hGUI, 2, 6, 190)
GUISetState()

; Set the display format
_GUICtrlDTP_SetFormat($hDTP, "dd:MM:yyyy")

; Loop until user exits
While GUIGetMsg() <> -3
    Sleep(10)
WEnd

Edit: changed format to what OP wanted

Edited by Mat
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...