Jump to content

Updating A Guictrlcreatedate


Recommended Posts

What format should the data be in to properly update a date control - I am making the assumption that the form GUICtrlSetData ($datecontrol, #a valid date#) is the format, but I can't seem to figure out what the language wants for #a valid date#.

20060421

2006/04/21

04/21/2006

I know I'll go " :think: but of course :"> " when I hear the answer - so please be kind :(

Thomas Brown

Edited by twbradio
Anyone have a TRS 80 Model III for sale?
Link to comment
Share on other sites

  • Moderators

This should give you an idea.

#include <GUIConstants.au3>

GUICreate("My GUI get date", 200, 200, 800, 200)
$date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20)
$button = GUICtrlCreateButton("Change", 10, 40)

; to select a specific default format
$DTM_SETFORMAT = 0x1005
$style = "yyyy/MM/dd HH:mm:s"
GUICtrlSendMsg($date, $DTM_SETFORMAT, 0, $style)

GUISetState()
While GUIGetMsg() <> $GUI_EVENT_CLOSE
    Select
        Case GUIGetMsg() == $button
            GUICtrlSetData($date, "2006/04/21")
    EndSelect
WEnd
Link to comment
Share on other sites

  • Moderators

Thank you very much - this is my first go around with the date control, and for some reason I just couldn't get it right.

Tom

It was mine too, I just have good research skills. :think:

Glad I could help.

p.s. why are you looking for a computer from the 80s?

TRS-80 Model III

Introduced: July 1980

CPU: Zilog Z-80, 2.03 MHz (smokin!!!)

RAM: 48K

Ports: Tape (500 or 1500 bauds), Parallel & RS232

Display: 12" B/W monitor built-in: 16 X 64 text

Storage: Two internal 178K floppy drives, External hard drive

Operating System: TRS-DOS.

Edited by big_daddy
Link to comment
Share on other sites

p.s. why are you looking for a computer from the 80s?

I took my first programming course in '83 on a TRS 80 model III - mostly, it's just a joke ... but there is a certain amount of nostalga involved as well.

Tom

Anyone have a TRS 80 Model III for sale?
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...