Date Time Functions

Top  Previous  Next

For further information see: http://www.winguides.com/scripting

See Also: oUtilities.VBFormat

Date() - Returns the Current System Date
The Date() function returns the current date from to the system clock.

DateAdd() - Change a Date by a Specified Time Interval
The DateAdd() function allows you to change a date by adding to or reducing it by a specified time interval. For example, calculate the date 9 days ago.

DateDiff() - Calculate the Difference Between Two Dates
The DateDiff() function is used to compare two dates and calculate the period between them in days, months, years, hours, minutes or seconds.

DatePart() - Determine Specified Part of a Given Date
The DatePart() function is used to determine the specified part of a given date, for example the day of the week or the month of the year.

DateSerial() - Create a Date Variable from Day, Month and Year
The DateSerial() function creates a date variable from the supplied day, month and/or year parameters.

DateValue() - Create a Date from a Formatted Date String
The DateValue() creates a date variable from the supplied formatted date (and/or time) string.

Day() - Determine the Day from a Date
The Day() function is used to determine the day from a date variable or formatted string.

FormatDateTime() - Creates a Formatted Date String
The FormatDateTime() function creates a formatted date/time string from the supplied date.

Hour() - Determine the Hour from a Date/Time
The Hour() function is used to determine the hour from a date/time variable or formatted string.

Minute() - Determine the Minutes from a Date/Time
The Minute() function is used to determine the number of minutes from a date/time variable or formatted string.

Month() - Determine the Month from a Date
The Month() function is used to determine the month from a date variable or formatted string.

MonthName() - Creates a string indicating the specified month
The MonthName() function returns a string representation of the name for the specified month, e.g. January ... December.

Now() - Returns the current date and time
The Now() function returns the current date and time according to the setting of the host computer's system date and time.

Second() - Determine the Seconds from a Date/Time
The Second() function is used to determine the number of seconds from a date/time variable or formatted string.

Time() - Returns the current system time
The Time() function returns the current time according to the settings of the host computer's system time.

Timer() - Returns the number of seconds since midnight
The Timer() function returns the number of seconds that have elapsed since 12:00 AM (midnight).

TimeSerial() - Create a time from Hours, Minutes and Seconds
The TimeSerial() functions creates a date variant for the time specified using hours, minutes and seconds.

TimeValue() - Create a time from a formatted time string
The TimeValue() creates a date variant containing the time from the supplied formatted time string.

Weekday() - Determine the weekday from a date
The Weekday() function is used to determine the weekday from a date variable or formatted string.

WeekdayName() - Creates a string indicating the specified weekday
The WeekdayName() function returns a string representation of the name for the specified weekday, e.g. Monday ... Sunday.

Year() - Determine the year from a date
The Year() function is used to determine the year from the supplied date variable or formatted string.