天软金融分析.NET函数大全
>
TSL函数
>
基础函数
>
日期时间
>
常用日期时间函数
StrToTimeDef
复制链接
简述
将字符串S转换成TDateTime类型的时间,如果转换不成功,则返回Default指定的默认时间。
定义
StrToTimeDef(S: String; Default: TDateTime): TDateTime;
参数
名称
类型
说明
S
String
字符串,时间的字符串类型,如"15:20:34"
Default
TDateTime
TDateTime类型,默认值
返回
TDateTime
小数,时间点
范例
time:=StrToTimeDef("15:61:34 ",time());
Return time; //输出当前系统时间
参考
TDateTime
SetFormatLocalCode
GetFormatLocalCode
相关
EncodeDate
EncodeTime
TryEncodeDate
TryEncodeTime
DecodeDate
DecodeDateFully
DecodeTime
DayOfWeek
Date
Time
Now
CurrentYear
IncAMonth
IsLeapYear
DateToStr
TimeToStr
DateTimeToStr
StrToDate
StrToDateDef
TryStrToDate
StrToTime
Strtodatetime2
StrToTimeDef
TryStrToTime
StrToDateTime
StrToDateTimeDef
TryStrToDateTime
FormatDateTime
DateTimeToString
DateTimeToInternetStr
DateTimeGMTToCookieStr
DateTimeGMTToHttpStr
GMTToLocalDateTime