Viewing today's date 
Author Message
 Viewing today's date

Hello,
 I want to write a program, and I would like to be able to see today's
date in either a texbox or label. I have tried to use the Format$( ), But
I want the date to appear in a box when I start up the program. Right now
the only way I can view the date is by clicling the form then the date
appears on the form. Is there anyway to get the date to appear in a box
when I first start a program? Please help me. Email me if you know of a
code that will let me do what I want to do. Thank you




Sun, 07 Jun 1998 03:00:00 GMT  
 Viewing today's date
Hi fid59

This is how I would do:

1. at the MDI parent, place a Panel3D, set property alignment to bottom.
   set BevelInner to: none. The panel will be your status bar.

2. on your Panel/statusbar, place a new much smaller Panel3D. Set    
   BevelInner to: none and bevelOuter to: inset and name it:pnlDate1.    
   This is your date-window.

3. At the MDIForm_Activate event write:
   Sub MDIForm_Activate
       pnlDate1 = Format$(Now,"YY:MM:DD")
   End Sub



Sun, 07 Jun 1998 03:00:00 GMT  
 Viewing today's date

Quote:
>Hello,
> I want to write a program, and I would like to be able to see today's
>date in either a texbox or label. I have tried to use the Format$( ), But
>I want the date to appear in a box when I start up the program. Right now
>the only way I can view the date is by clicling the form then the date
>appears on the form. Is there anyway to get the date to appear in a box
>when I first start a program? Please help me. Email me if you know of a
>code that will let me do what I want to do. Thank you



Try placing the label on the form and putting the following in the
form load sub.

SUB Form_Load()
     lblDate.Caption = Format(Date$, "mm/dd/yy")
End Sub



Sun, 07 Jun 1998 03:00:00 GMT  
 Viewing today's date

Quote:

>Hello,
> I want to write a program, and I would like to be able to see today's
>date in either a texbox or label. I have tried to use the Format$( ), But
>I want the date to appear in a box when I start up the program. Right now
>the only way I can view the date is by clicling the form then the date
>appears on the form. Is there anyway to get the date to appear in a box
>when I first start a program? Please help me. Email me if you know of a
>code that will let me do what I want to do. Thank you



Sub Form_Load ()
Label1 = Format$(Now, "dd/mm/yy") 'or whatever
End Sub

---

             "Not tonight dear, I have a modem"



Wed, 10 Jun 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Selecting Today's Date With Sheridan Date Combo

2. 'Outlook Today' style view

3. Adding a variable number of weeks to today's date

4. Getting today's date.....

5. Returning today's date

6. Accessing today's date in a filter

7. Inserting today's date

8. Today's Date

9. getting today's date

10. Automatically selecting *today's* date - MonthView control

11. Date time picker has today's value

12. How to subtract a value from today's date

 

 
Powered by phpBB® Forum Software