Download presentation
Presentation is loading. Please wait.
Published byMillicent Terry Modified over 8 years ago
2
Overview of Date Functions Getting the current system date Getting the current system time Comparing dates Comparing times
3
Getting the Current System Date The DateString function returns the date of the computer as set in the system's control panel. So for example txtTheDate.Text = DateString Would display the current date in a text box called txtTheDate.
4
Getting the Current System Time The TimeString function returns the time of the computer as set in the system's control panel So for example txtTheTime.Text = TimeString Would display the current time in a text box called txtTheTime.
5
The Date Data Type An example of comparing dates…
6
Now The value of Now incorporates both the Date and the Time! So the following is a valid example of data returned by Now... 31/1/2005 11:19:23 Consider the following code... Dim MyDate As Date MyDate = Now lblMessage.Text = MyDate.Date Assuming the above value of Now, what value will be displayed in the control lblMessage?
7
Comparing Times Simple time comparisons are not a problem as follows...
8
Identifying a specific time Now.TimeOfDay, produces results like… 15:00:34.1093750 But does an alarm clock need to be so precise?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.