Delphi time and date Processing dateutils time unit

Source: Internet
Author: User
Tags iso 8601 time 0

Dateutils time unit, very useful.

Remember to reference this unit, otherwise it cannot be used.

Comparedate: Compare the size of the date part of two date and time values
Comparedatetime compares the sizes of two datetime values
Comparetime: Compare the size of the time part of two date and time values
Dateof remove the time part of the date and time value
Datetimetojuliandate: the date and time value of the conversion is the day of the Confucianism.
Datetimetomodifiedjuliandate converts the date and time value to the improved ruru day.
Datetimetounix converts the datetime value to the UNIX/Linus datetime value.
Day of week constant ISO 8601 standard constant of the day sequence of each week
Dayof returns the day of a date value.
Dayofthemonth returns the day of a datetime value.
Dayoftheweek returns a date value that is the day of the week
Dayoftheyear returns the number of days of the year of a date and time value.
Daysbetween returns the integer number of days between two datetime values
Daysinamonth returns the number of days in a specified year or month.
Daysinayear returns the number of days in a specified year.
Daysinmonth returns the number of days of a month with a datetime value.
Daysinyear returns the number of days of a year with a datetime value.
Dayspan returns the number of decimal days between two date and time values.
Decodedateday returns the year of a date value and the number of days of the year.
Decodedatemonthweek returns the year, month, week of that month, day of that week
Decodedatetime returns the year, month, day, hour, minute, second, and millisecond of A datetime value.
Decodedateweek returns the year of a date value, the week of a year, and the day of a week.
Decodedayofweekinmonth returns the year, month, day of the week, and day of the month of a date value.
Encodedateday returns the date and time of the specified year and year.
Encodedatemonthweek returns the date and time values of the specified year, month, week of that month, and day of that week.
Encodedatetime returns the date and time value of the specified year, month, day, hour, minute, and second, in milliseconds.
Encodedateweek returns the date and time value of the specified year, the week of the year, and the day of the week.
Encodedayofweekinmonth returns the date and time value of the Day of the specified year, month, or month.
Endofaday returns the date and time value of the last second of the specified year and the day of the year.
Endofamonth returns the date and time value of the last second of the last day of the specified year and month.
Endofaweek returns the date and time value of the last second of the specified year, the week of the year, and the day of the week.
Endofayear returns the date and time value of the last second of the last day of the specified year.
Endoftheday returns the date and time value of the last second of the day of the specified date and time value.
Endofthemonth returns the date and time value of the last second of the last day of the month of the specified date and time value.
Endoftheweek returns the date and time value of the last second of the last day of the week of the specified date and time value.
Endoftheyear returns the date and time value of the last second of the Year of the specified date and time value.
Hourof returns the hour part of the specified date and time value
Houroftheday returns the hour part of the specified date and time value.
Hourofthemonth returns the number of hours that have been spent from the first day of the month with the specified date value to the hour of the specified date.
Houroftheweek returns the number of hours that have been spent in the hour from the first day of the week to the specified date.
Houroftheyear returns the number of hours that have been spent in the hour from the first day of the year to the specified date.
Hoursbetween returns the hours of difference between two specified date and time values.
Hourspan returns the hours (including decimal part) between two specified date and time values)
Incday returns the value after the specified number of days after the date value is extended.
Inchour returns the value of the specified number of hours in the backward direction of the date and time value.
Incmillisecond returns the date and time value, which is specified by the number of milliseconds in the backward direction.
Incminute returns the date and time value and specifies the number of minutes in the backward direction.
Incsecond returns the value of the specified number of seconds in the backward direction of the date and time value.
Incweek returns the date and time value and specifies the number of weeks in the backward direction.
Incyear returns the date and time value and specifies the number of weeks in the backward direction.
Isinleapyear: determines whether the year of the specified date and time value is a leap year.
ISPM checks whether the specified date and time value is after noon
Issameday checks whether a date and time value is the same day as the standard Date and Time Value.
Istoday
Isvaliddate: determines whether the specified year, month, or day is a valid date.
Isvaliddateday determines whether the specified year and the number of days in the year are valid days in the year
Isvaliddatemonthweek determines whether the specified year, month, week of the month, and day of the week are valid dates.
Isvaliddatetime determines whether the specified year, month, day, hour, minute, second, and millisecond are valid date and time values.
Isvaliddateweek determines whether the specified year, the week number of the year, and the day of the week are valid dates.
Isvalidtime is used to determine whether the specified time, minute, second, or millisecond is valid.
Juliandatetodatetime converts the Confucian date to the datetime Value
Millisecondof returns the millisecond part of the specified date and time value
Millisecondoftheday returns the number of milliseconds from 00:00:00 of the specified date and time to the specified time.
Millisecondofthehour: returns the number of milliseconds from the time 0 minutes 0 seconds to the time specified by the specified date.
Millisecondoftheminute returns the number of milliseconds from the minute 0 s 0 ms to the specified time value.
Millisecondofthemonth returns the number of milliseconds from the first day of the month to the specified time value, 0 seconds, 0 milliseconds, to the specified time.
Millisecondofthesecond returns the millisecond part of the specified date and time value
Millisecondoftheweek returns the number of milliseconds from 00:00:00 on Monday of the week to the specified time value.
Millisecondoftheyear returns the number of milliseconds from 00:00:00, January 1, January 1, to the specified time.
Millisecondsbetween returns the number of milliseconds (integer) between two specified date and time values)
Millisecondspan returns the number of milliseconds (decimal) between two specified date and time values)
Minuteof returns the minute part of the specified date and time value.
Minuteoftheday returns the number of minutes from 00:00 of the specified date and time to the specified time.
Minuteofthehour returns the minute part of the specified date and time value
Minuteofthemonth returns the number of minutes from 00:00 on the first day of the month to the specified time value.
Minuteoftheweek returns the number of minutes from 00:00 on the seventh day of the week to the specified time value.
Minuteoftheyear returns the number of minutes from 00:00, January 1, January 1, to the specified time value.
Minutesbetween returns the number of minutes (integer) between two specified date and time values)
Minutespan returns the number of minutes (including decimal places) between two specified date and time values)
Modifiedjuliandatetodatetime: the modified Date and time is the datetime value.
Monthof returns the month portion of the specified date and time value.
Monthoftheyear returns the month portion of the specified date and time value.
Monthsbetween returns the month (integer) that differs between two specified date and time values)
Monthspan returns the month (including decimal places) between two specified date and time values)
Nthdayofweek returns the day of the week of the month based on the specified date and time.
The constant of onehour. The constant of Delphi is inversely proportional to the time.
Onemillisecond constant a constant in inverse ratio of Delphi to time
The oneminute constant is a constant that is inversely proportional to time.
A constant of onesecond. The time is inversely proportional to Delphi.
Recodedate replaces the date part of the specified date and time value
Recodedatetime: Replace the specified date and time
Recodeday replaces the day part of the specified date and time value
Recodehour replaces the hour part of the specified date and time value
Recodemillisecond replaces the millisecond part of the specified date and time value
Recodeminute replaces the minute part of the specified date and time value
Recodemonth replaces the month part of the specified date and time value
Recodesecond replaces the second part of the specified date and time value
Recodetime replaces the time part of the specified date and time value
Recodeyear replaces the year part of the specified date and time value
Samedate determines whether the year, month, and day of the two date and time values are the same
Samedatetime determines whether the year, month, day, hour, minute, second, and millisecond values of the two date and time values are the same
Sametime determines whether the time, minute, second, and millisecond values of the two date and time values are the same
Secondof returns the second part of the specified date and time value
Secondoftheday returns the number of seconds from 00:00:00 on the specified date and time value to the specified time.
Secondofthehour returns the number of seconds from the specified date and time value 0 minutes 0 seconds to the specified time.
Secondoftheminute returns the number of seconds from the specified date and time value to the specified time.
Secondofthemonth returns the number of seconds from the specified date and time value 00:00:00 on the first day of the month to the specified time.
Secondoftheweek returns the number of seconds from Monday 00:00:00 of the week to the specified time.
Secondoftheyear returns the number of seconds from January 1 00:00:00 of the year to the specified time.
Secondsbetween returns the number of seconds (integer) between two specified date and time values)
Secondspan returns the number of seconds (including decimal places) between two specified date and time values)
Startofaday returns the date and time value from the specified day (00:00:00 0 ms)
Startofamonth returns the datetime value starting from the first day of the specified year and month (00:00:00 0 ms ).
Startofaweek returns the date and time values of the specified year, Week, and day (00:00:00 0 ms ).
Startofayear returns the date and time value of the specified year (January 1 00:00:00 0 ms ).
Startoftheday returns the datetime value starting from the specified date (00:00:00 0 ms)
Startofthemonth returns the date and time value of the specified date and time value starting from that month (00:00:00, 1 day, 0 ms ).
Startoftheweek returns the date and time value of the specified date and time value starting from that week (00:00:00 on the first day, 0 ms ).
Startoftheyear returns the date and time value starting from the year (January 1 00:00:00 0 ms)
Timeof returns the time part of the specified date and time value.
Today returns the date of the current day.
Tomorrow returns the date of the next day
Tryencodedateday calculates the datetime value of the specified year and the day of the year.
Tryencodedatemonthweek calculates the date and time values of the specified year, month, week of the month, and day of the week.
Tryencodedatetime converts year, month, day, hour, minute, second, and millisecond to date and time values.
Tryencodedateweek converts the year, Week, and day of the week to the date and time value.
Tryencodedayofweekinmonth converts the day of the week of the specified year, month, and month to the date and time value.
Tryjuliandatetodatetime converts the specified date and time as the date value.
Trymodifiedjuliandatetodatetime is converted to specify the date and time value for modifying the ruru date.
Tryrecodedatetime selects to replace some parts of the specified date and time value
Unixtodatetime converts Unix or Linux date and time to Delphi date and time.
Weekof returns the week number of the year with the specified date and time value.
Weekofthemonth returns the week of a month with the specified date and time.
Weekoftheyear returns the week number Of The Year of the specified date and time.
Weeksbetween returns the week (integer) Difference between two specified date and time values)
Weeksinayear returns the number of weeks in a specified year.
Weeksinyear returns the number of weeks in the year of the specified date and time value.
Weekspan returns the number of weeks (including decimals) between two specified date and time values)
Withinpastdays: determines whether the difference between two dates is within the specified number of days.
Withinpasthours determines whether the difference between the two datetime values is within the specified hour range
Withinpastmilliseconds determines whether the difference between two datetime values is within the specified millisecond range
Withinpastminutes determines whether the difference between the two datetime values is within the specified minute range
Withinpastmonths determines whether the difference between the two datetime values is within the range of the specified month.
Withinpastseconds determines whether the difference between two datetime values is within the specified time range
Withinpastweeks determines whether the difference between the two date and time values is within the range of the specified number of weeks
Withinpastyears determines whether the difference between two date and time values is within the range of the specified number of years
Yearof returns the year part of the specified date and time value.
Yearsbetween returns the year (integer) of the difference between two specified date and time values)
Yearspan returns the number of years (including decimal digits) of the difference between two specified date and time values)
Yesterday returns the date of the previous day (yesterday) of the current date.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.