Jump to content

[Solved] Date Help


Recommended Posts

I am well on my way to making a calendar, but I am having trouble changing the date of my controls. I think it has something to do with the format, but I am not sure. Thanks in advance!

Edited by dantay9
Link to comment
Share on other sites

I do not think this is what you want

; Gui 

$Button[0] = GUICtrlCreateButton("+", 752, 79, 23, 23, 0)

and

$Button[3] = GUICtrlCreateButton("Edit", 608, 424, 150, 30, 0)


; while loop

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $FileExit
            Exit
        Case $Button[1] ; add button
            AddAppointment()
        Case $Button[0] ; edit category button
            EditCategory()
    EndSwitch

???

Valuater

8)

EDIT: I do not have trouble changing the dates on the controls

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

I notice that the edit button was not working. I thought that was part of the problem.

Can you explain the problem just a little more, which control is having the problem etc.

Again... I do not have trouble changing the dates on the controls

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

The edit control is going to be used, I just haven't done anything with it yet. My problem is around line 162 with changing the dates. They don't change. They are supposed to revert back to their previous time.

The whole idea is to have the event come up in the listview box and when clicked, the stuff from that event fills in the input boxes, dates, and combo boxes. I can't get the date or the time to change. It looks right in the ini file, but I think the format must be wrong

Edit: I figured it out the problem. The date in the ini file is 3/14/2009 when it needs to be 2009/3/14 to work. How do you change the date to this format?

Edited by dantay9
Link to comment
Share on other sites

I'm glad you got it to work. I could not get it to work.

I see you set the messge with this...

$Date[0] = GUICtrlCreateDate("2009/03/14", 248, 195, 89, 21, $WS_TABSTOP)
GUICtrlSendMsg(-1, $DTM_SETFORMAT_, 0, "MM/dd/yyyy")
$Date[1] = GUICtrlCreateDate("2009/03/14", 352, 195, 89, 21, $WS_TABSTOP)
GUICtrlSendMsg(-1, $DTM_SETFORMAT_, 0, "MM/dd/yyyy")

8)

Edited by Valuater

NEWHeader1.png

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