摘要: Delphi获取与设置系统时间格式(长日期与短日期)(2011-08-06 11:40:13)转载▼标签:delphi长日期短日期格式it分类: DelphiDelphi获得与设置系统时间格式在Delphi中,特别是在写管理系统软件时,经常要用到 FormatDateTime 以将 TDateTime 格式的日期时间转换成字符串形式的值显示或保存起来,或者用 StrToDateTime将字符串形式的日期时间转换成 TDateTime 然后再做其他操作。在进行时间或日期的转换时,会使用系统当前设定的时间日期格式。而如果时间日期格式与字符串中的表示方式不相符,会使转换过程失败。例如当前短日期格式设 阅读全文
posted @ 2012-01-01 19:47 byronming 阅读(3130) 评论(0) 推荐(0) 编辑
摘要: Delphi里有现成的函数可以实现日期加减,是在DateUtils单元里的。function IncYear(const AValue: TDateTime;const ANumberOfYears: Integer = 1): TDateTime;// function IncMonth is in SysUtilsfunction IncWeek(const AValue: TDateTime;const ANumberOfWeeks: Integer = 1): TDateTime;function IncDay(const AValue: TDateTime;const ANumber 阅读全文
posted @ 2012-01-01 12:20 byronming 阅读(16698) 评论(0) 推荐(0) 编辑