Upload
a-r
View
3.356
Download
1
Embed Size (px)
DESCRIPTION
Citation preview
DATE & TIME FUNCTIONS
ASHISH S. RAHURKAR
Microsoft.VisualBasic.DateAndTime Namespace
DateAddDateDiffDatePartDateStringDateValueNow
SecondTimeOfDayTimeStringTimeValueTodayWeekDayWeekDayName
CONTROLS USED
ButtonLabelDateTimePicker
CONTROL PROPERTIES
BUTTON LABEL
NameText
NameTextFont
CONTROL PROPERTIES (CONTINUED)
DateTimePickerNameValue
DateAdd
Returns date value to which a time interval has been added.
Arguments:-Interval – DateInterval enumeration val
(str)Number – (+,-) Double valueDateValue - date
DateDiff
Returns Long value representing the time interval between two dates
Arguments:-IntervalDate1,Date2DayOfWeek – Optional, FirstDayOfWeek
enumeration, default SundayWeekOfYear – Optional, FirstWeekOfYear
enumeration, default Jan1
DatePart
Returns an integer value representing the requested part of a date.
Arguments:-IntervalDateValueDayOfWeekWeekOfYear
DateString
It’s a propertyReturns or sets a string value representing
the current date on your system
DateValue
Returns a Date data type value containing the date represented by a string.
Arguments:-DateString – (eg – January 15, 1994)
Now
It’s a property.Returns a date value containing the
current date & time of your system
Second
Returns an integer value representing second of the minute of the date passed
Argument:-TimeValue
TimeOfDay
It’s a propertyReturns time value containing the current
date & time of your systemWhere date value is set to all 1’s
TimeString
It’s a propertyReturns or sets a string value representing
the current time of day according to your system
TimeValue
Returns a date value representing the time of a string passed
Here date value is set to all 1’sArguments:-TimeString – range from 1/1/1 00:00:00 to
12/31/9999 23:59:59
Today
It’s a propertyReturns or sets a date value containing
the current date according to your system
WeekDay
Returns an integer value containing a number representing the day of the week
Arguments:-DateValueDayOfWeek
WeekDayName
Returns a string value containing the name of the specified weekday
Arguments:-WeekDay – 1 to 7Abbreviate – Optional boolean valueFirstDayOfWeekValue –
FirstDayOfWeek.System is default