18
DATE & TIME FUNCTIONS ASHISH S. RAHURKAR

Date & time functions in VB.NET

  • Upload
    a-r

  • View
    3.356

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Date & time functions in VB.NET

DATE & TIME FUNCTIONS

ASHISH S. RAHURKAR

Page 2: Date & time functions in VB.NET

Microsoft.VisualBasic.DateAndTime Namespace

DateAddDateDiffDatePartDateStringDateValueNow

SecondTimeOfDayTimeStringTimeValueTodayWeekDayWeekDayName

Page 3: Date & time functions in VB.NET

CONTROLS USED

ButtonLabelDateTimePicker

Page 4: Date & time functions in VB.NET

CONTROL PROPERTIES

BUTTON LABEL

NameText

NameTextFont

Page 5: Date & time functions in VB.NET

CONTROL PROPERTIES (CONTINUED)

DateTimePickerNameValue

Page 6: Date & time functions in VB.NET

DateAdd

Returns date value to which a time interval has been added.

Arguments:-Interval – DateInterval enumeration val

(str)Number – (+,-) Double valueDateValue - date

Page 7: Date & time functions in VB.NET

DateDiff

Returns Long value representing the time interval between two dates

Arguments:-IntervalDate1,Date2DayOfWeek – Optional, FirstDayOfWeek

enumeration, default SundayWeekOfYear – Optional, FirstWeekOfYear

enumeration, default Jan1

Page 8: Date & time functions in VB.NET

DatePart

Returns an integer value representing the requested part of a date.

Arguments:-IntervalDateValueDayOfWeekWeekOfYear

Page 9: Date & time functions in VB.NET

DateString

It’s a propertyReturns or sets a string value representing

the current date on your system

Page 10: Date & time functions in VB.NET

DateValue

Returns a Date data type value containing the date represented by a string.

Arguments:-DateString – (eg – January 15, 1994)

Page 11: Date & time functions in VB.NET

Now

It’s a property.Returns a date value containing the

current date & time of your system

Page 12: Date & time functions in VB.NET

Second

Returns an integer value representing second of the minute of the date passed

Argument:-TimeValue

Page 13: Date & time functions in VB.NET

TimeOfDay

It’s a propertyReturns time value containing the current

date & time of your systemWhere date value is set to all 1’s

Page 14: Date & time functions in VB.NET

TimeString

It’s a propertyReturns or sets a string value representing

the current time of day according to your system

Page 15: Date & time functions in VB.NET

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

Page 16: Date & time functions in VB.NET

Today

It’s a propertyReturns or sets a date value containing

the current date according to your system

Page 17: Date & time functions in VB.NET

WeekDay

Returns an integer value containing a number representing the day of the week

Arguments:-DateValueDayOfWeek

Page 18: Date & time functions in VB.NET

WeekDayName

Returns a string value containing the name of the specified weekday

Arguments:-WeekDay – 1 to 7Abbreviate – Optional boolean valueFirstDayOfWeekValue –

FirstDayOfWeek.System is default