请教那里有Delphi日期操作函数详细说明啊?

解决方案 »

  1.   

    在Delphi的代码编辑器中输入DateToStr,按F1,点击‘date/time routines’,里面都是了。使用时要注意函数所在的单元,必要时要uses。
      

  2.   

    在DateUtils单元,里面的都是!
      

  3.   

    有很多了,看Help就有了
    CheckSqlTimeStamp procedureChecks whether a TSQLTimeStamp value represents a valid date and time.CompareDate functionIndicates the relationship between the date portions of two TDateTime values.CompareDateTime functionIndicates the relationship between two TDateTime values.CompareTime functionIndicates the relationship between the time portions of two TDateTime values.CurrentYear functionReturns the current year.Date functionReturns the current date.DateDelta constantSpecifies the difference between TDateTime and TTimeStamp values.DateOf functionStrips the time portion from a TDateTime value.DateTimeToFileDate functionConverts a TDateTime object to an OS timestamp.DateTimeToSQLTimeStamp functionConverts a TDateTime value to a TSQLTimeStamp value.DateTimeToStr functionConverts a TDateTime value to a string.DateTimeToString procedureConverts a TDateTime value to a string using a specified Format.DateTimeToSystemTime procedureConverts a TDateTime value into the Win32 API's system time type.DateTimeToTimeStamp functionConverts a TDateTime value into the corresponding TTimeStamp value.DateToStr functionConverts a TDateTime value to a string.Day of week constantsProvide symbolic constants for ISO 8601-compliant day of the week values.DayOf functionReturns the day of the month represented by a TDateTime value.DayOfTheMonth functionReturns the day of the month represented by a TDateTime value.DayOfTheWeek functionReturns the day of the week represented by a TDateTime value.DayOfTheYear functionReturns the number of days between a specified TDateTime value and December 31 of the previous year.DayOfWeek functionReturns the day of the week for a specified date.DaysBetween functionReturns the number of whole days between two specified TDateTime values.DaysInAMonth functionReturns the number of days in a specified month of a specified year.DaysInAYear functionReturns the number of days in a specified year.DaysInMonth functionReturns the number of days in the month of a specified TDateTime value.DaysInYear functionReturns the number of days in the year of a specified TDateTime value.DaySpan functionReturns the number of days (including fractional days) between two specified TDateTime values.DecodeDate procedureReturns Year, Month, and Day values for a TDateTime value.DecodeDateDay procedureReturns the year and day of the year for a specified TDateTime.DecodeDateFully functionReturns Year, Month, and Day, and Day-of-Week values for a TDateTime value.DecodeDateMonthWeek procedureReturns the year, month, week of the month, and day of the week for a specified TDateTime.DecodeDateTime procedureReturns Year, Month, Day, Hour, Minute, Second, and Millisecond values for a TDateTime.DecodeDateWeek procedureReturns the year, week of the year, and day of the week for a specified TDateTime value.DecodeDayOfWeekInMonth procedureFor a given TDateTime value, returns the year, month, day of the week, and the count of that day of the week in the month.DecodeTime procedureBreaks a TDateTime value into hours, minutes, seconds, and milliseconds.EncodeDate function functionReturns a TDateTime value that represents a specified Year, Month, and Day.EncodeDateDay functionReturns a TDateTime that represents a specified day of the year for a specified year.EncodeDateMonthWeek functionReturns a TDateTime that represents a specified day of a specified week in a specified month and year.EncodeDateTime functionReturns a TDateTime that represents a specified year, month, day, hour, minute, second, and millisecond.EncodeDateWeek functionReturns a TDateTime that represents a specified day of a specified week in a specified year.EncodeDayOfWeekInMonth functionReturns a TDateTime that represents a specified occurrence of a day of the week within a specified month and year.EncodeTime functionReturns a TDateTime value for a specified Hour, Min, Sec, and MSec.EndOfADay functionReturns a TDateTime that represents the last millisecond of a specified day.EndOfAMonth functionReturns a TDateTime that represents the last millisecond of the last day of a specified month.EndOfAWeek functionReturns a TDateTime value that represents the last millisecond of a specified day of a specified week.EndOfAYear functionReturns a TDateTime that represents the last millisecond of a specified year.EndOfTheDay functionReturns a TDateTime that represents the last millisecond of the day identified by a specified TDateTime.EndOfTheMonth functionReturns a TDateTime that represents the last millisecond of the last day of the month identified by a specified TDateTime.EndOfTheWeek functionReturns a TDateTime that represents the last millisecond of the last day of the week identified by a specified TDateTime.EndOfTheYear functionReturns a TDateTime that represents the last millisecond of the last day of the year identified by a specified TDateTime.………
      

  4.   

    有个isValidDate参数是三个数字.看来判断字串还得要自己动手写哟!