Calender dates. 
Author Message
 Calender dates.

Hi,

Does anybody know how i can get the user to enter a date
in the format DD/MM/YY in to a text box, and then have the
computer return the day of that date in another text box?

Once again thanks in advance.

Manny



Fri, 29 Apr 2005 21:57:24 GMT  
 Calender dates.

Quote:
> Hi,

> Does anybody know how i can get the user to enter a date
> in the format DD/MM/YY in to a text box,

No. The problem is... you can't force the user into typing the day
first. If you asked me to fill in your TextBox, my tendency would be to
put MM/DD/YY. Your best bet is to use a DatePicker control (Ctrl+T and
then select Microsoft Windows Common Controls-2 from list) where the
user can select the date from a calendar display.

Quote:
> and then have the computer return the day of that date in
> another text box?

Do you want the DD part of DD/MM/YY? You get that from

     Text2.Text = Day(CDate(Text1.Text))

Or did you want the day of the year? You get that from

     Text2.Text = DatePart("y", CDate(Text1.Text))

Of course, if you'll have to verify that the contents of the TextBox is
really a date.

Rick - MVP

Quote:
> Once again thanks in advance.

> Manny



Sat, 30 Apr 2005 01:34:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting Julian dates to Calender dates.

2. How to create appointment calender from calender in VB

3. How to create the calender in MDI form without using vbBuilt in Calender Function

4. Select a date in the Calender Folder

5. Can we open specific user calender on apecific date

6. Calender Control Date selector

7. Highlighting various dates in a calender control

8. Calender & Passing the date

9. how do i use date picker & calender

10. Error 424, object required; putting a date from a calender (userform) in a date formfield

11. Calender style date menu: how do I convert datetime to date?

12. Date - date = date

 

 
Powered by phpBB® Forum Software