Skip to main content

[Migrated content. Thread originally posted on 24 March 2003]

Does anyone know how to get the Microsoft Date Time Picker
to display something different than the current date when the screen first displays??

Thank you very much

[Migrated content. Thread originally posted on 24 March 2003]

Does anyone know how to get the Microsoft Date Time Picker
to display something different than the current date when the screen first displays??

Thank you very much
There's a couple of different ways to do it.
You could modify the control for the individual month, day, and year elements.
for example:

MODIFY DTP-1 @Day(26).
MODIFY DTP-1 @Month(03).
MODIFY DTP-1 @Year(2003).

Or, you could just move the date you want to a variable and modify the value of the control.
for example:

MOVE "3/26/2003" TO TEST-VALUE.
MODIFY DTP-1 @Value(TEST-VALUE).

I had TEST-VALUE defined as PIC X(10).

Both ways give you a 3/26/2003 date.

[Migrated content. Thread originally posted on 24 March 2003]

Does anyone know how to get the Microsoft Date Time Picker
to display something different than the current date when the screen first displays??

Thank you very much
A small correction if I may,

The Day, Month and Year are properties of the DTPicker control, not methods. As methods should use parenthesis and properties not, I would suggest one distinguishes in this, hence:

MODIFY DTP-1 @Day = 26.
MODIFY DTP-1 @Month = 03.
MODIFY DTP-1 @Year = 2003.

Also, note that the @ character are optional as long as the succeeding word is not in conflict with a reserved ACUCOBOL-GT word. Day, Month and Year are not in conflict, and may as such be used without the @ prefix.
"Value" on the contrary, are a reserved ACUCOBOL-GT word and should be prefixed with @ to make it clear that we want the control version executed.

A note on simplicity, are you aware that you can simplify the above, by doing this:

MODIFY DTP-1
Day = 26
Month = 03
Year = 2003.

[Migrated content. Thread originally posted on 24 March 2003]

Does anyone know how to get the Microsoft Date Time Picker
to display something different than the current date when the screen first displays??

Thank you very much
Thank you both very much