Date Time Picker

S

Sandy

Hello -

Can someone point me in the direction of a good article(s) on the Date Time
Picker?
I am having trouble formatting it. When I enter a custom date of mm/dd/yy,
I get e.g. for today, 58/7/05. It works when I use their regular format from
the drop down list with a four-digit year, but I don't want four digits.

Also, as far as coding is concerned, I thought if I set it for a date, when
I click a date, it would return a date and then I would do stuff with the
date.

I created a textbox and set the text value of it to the value of the Date
Time Picker and was surprised to see that it returned, not only the date, but
the time.

Any help will be greatly appreciated!
 
R

Rob G

Hi Sandy;

I had the same issue the other day and found the mm format is the minute
format. The month format is MM.

Good luck.

Rob
 
S

Sandy

Thanks, Rob. Boy is that strange. I ended up putting in MM/dd/yy and it
came out correct.

Can I press for another answer or two? I would like this to default to
today's date. How do I go about doing that?

Also, for time, it works okay if I put in hh:mm, but what do I do about the
am/pm option? When I type in am/pm, it comes out as precisely that.

Again, any help is immensely appreciated!
 
R

Rob G

It is a strange format compared to other similar controls. If its OK to post
a helpful link here, please refer to
http://www.functionx.com/vbaccess/Lesson11.htm.

The formats are well documented and it should solve your problems.

I too am having problems setting the default value of this control.
According to some other posts, it looks like we can set the value to Date()
or something similar.

Take a look at another post. The subject is: "set a value with VBA in the
control date"... and the responder was "Norbert Bous via AccessMonster.com".
This is the most useful post with an appropriate level of detail.

Good luck.
 
S

Sandy

Thanks, Rob!
--
Sandy


Rob G said:
It is a strange format compared to other similar controls. If its OK to post
a helpful link here, please refer to
http://www.functionx.com/vbaccess/Lesson11.htm.

The formats are well documented and it should solve your problems.

I too am having problems setting the default value of this control.
According to some other posts, it looks like we can set the value to Date()
or something similar.

Take a look at another post. The subject is: "set a value with VBA in the
control date"... and the responder was "Norbert Bous via AccessMonster.com".
This is the most useful post with an appropriate level of detail.

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top