compare-date
compare-date(first date, second date)
物件一定要轉成日期格式,否則會出現XmlAtomicValueCastException
first < second : -1
first = second : 0
first > second : 1
tib:compare-date(tib:parse-date('yyyy-MM-dd',tib:format-dateTime('yyyy-MM-dd', expDateTime)), current-date())
compare-dateTime
compare-dateTime(first dateTime, second dateTime)
判斷邏輯同compare-date
compare-time
compare-time(first time, second time)
判斷邏輯同compare-date
format-dateTime(format, dateTime)
(dateTime→text)
format dateTime to string based on the format pattern (target data type is string)
tib:format-dateTime('yyyy-MM-dd HH:mm:ss', current-dateTime()) tib:format-dateTime('yyyy-MM-dd', current-dateTime())
format-date(format, date)
(date→text, 一定要用date, 否則會出XmlAtomicValueParseException)
format date to string based on the format pattern
tib:format-date('yyyy-MM-dd', current-date())
format-time(format, time)
tib:format-time('HH:mm:ss', '10:25:00')
parse-dateTime(format, string)
(text→dateTime)
convert string to dateTime based on the format pattern (target data type is dateTime)
tib:parse-dateTime("yyyy-MM-dd'T'HH:mm:ss","2015-10-01T10:00:00")
parse-time(format, string)
(text→time)
tib:parse-time("yyyy-MM-dd'T'HH:mm:ss","2015-10-01T10:00:00")
[Result:10:00:00]
Reference