Question:
How can I sort out into year, month, day, hour, and minute the value returned by the ShowDatePicker()?
Solution:
To do so, you must use specific VBScript’s methods, such as Year() or Month().
Example:
Application.ShowDatePicker Date_Time, 500, 500
MsgBox Date_Time ‘Shows the date and time value returned by the ShowDatePicker() method
MSgBox Year(Date_Time) ‘Shows only the year
MsgBox Right(“0″&Month(Date_Time), 2) ‘Shows only the month; if it has only one place(9), adds a zero to the left (09)
MsgBox Right(“0″&Day(Date_Time), 2)
MsgBox Hour(Date_Time)
MsgBox Minute(Date_Time)