天软金融分析.NET函数大全 > TSL函数 > 基础函数 > 日期时间 > 组合、分解日期函数

TryEncodeDateTime    

简述

根据给定的参数AYear, AMonth, ADay, AHour, AMinute, ASecond, AmilliSecond分别作为年、月、日、小时、分钟、秒、毫秒组成一个日期时间型变量存到参数AValue中,并返回一个布尔型真假值,表示是否是个有效的日期
定义
TryEncodeDateTime(AYear; AMonth; ADay; AHour; AMinute; ASecond; AMilliSecond: Integer; Var AValue: TDateTime): Boolean;
参数
名称类型说明
AYear Integer整数,年,定义域[1,9999]
AMonth Integer整数,月,定义域[1,12]
ADay Integer整数,日,定义域[1,31]
AHour Integer整数,小时,定义域[0,24],如果是24,则要求分钟、秒、毫秒全部为0
Aminute Integer整数,分钟,定义域[0,59]
Asecond Integer整数,秒,定义域[0,59]
AmilliSecond Integer整数,毫秒,定义域[0,999]
AValue TDateTime日期时间类型,组成的日期,返回值
返回 Boolean
布尔值,组成日期是否有效,1表示有效,0表示非有效日期。
相关