1. Computing & Technology
GlossaryTips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back
DateUtils unit
DELPHI RTL Reference

CompareDate function
Compares two TDateTime values (returns "less", "equal" or "greater"). Ignores the Time part if both values "fall" on the same day

CompareDateTime function
Compares two TDateTime values (returns "less", "equal" or "greater").

CompareTime function
Compares two TDateTime values (returns "less", "equal" or "greater"). Ignores the Date part if both values occur at the same time.

IncDay function
Adds or substracts a given number of days from a date value.

IsPM function
Returns true if the time portion of a TDateTime value occurs on or after 12:00 (noon) and before 24:00 (midnight).

DaySpan function
Gives the number of days (including fractional days) between two specified dates.

DaysBetween function
Gives the number of whole days between two specified dates.

DateOf function
Returns only the Date portion of the TDateTime value, by setting Time part to 0.

DayOfTheMonth function
Returns the day of the month from a given TDateTime value (from 1 to 31)

DayOfTheYear function
Returns the ordinal position of a TDateTime value's day within its year.

DateOfTheWeek function
Returns the day of the week for a given TDateTimeValue.

HourOf function
Returns the hour of the day represented by a TDateTime value.

TimeOf function
Returns only the Time portion of the TDateTime value, by setting Date part to 0.

WithinPastDays function
Returns true if two dates are within a specified number of days of each other.

WithinPastYears function
Returns true if two dates are within a specified number of years of each other.

YearsBetween function
Gives the number of whole years between two specified dates.

more to come...


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.