srprks
17th August 2016, 14:52
Hi All
I have a string variable containing the time like "05:30".
I want to update the equivalent long field into my table
How to do it
bdittmar
17th August 2016, 15:10
Hi All
I have a string variable containing the time like "05:30".
I want to update the equivalent long field into my table
How to do it
Hello,
inputstr.to.utc()
Syntax:
function long inputstr.to.utc (const string date.inputstr(), string date.format(7), const string time.inputstr(), string time.format(7))
Description
This converts the specified local date and time input strings to UTC long format.
Arguments
const string date.inputstr() A date string (in local time).
string date.format(7) Indicates the format of the date string, by using the substitution symbols %D xxx [, lang ] .
const string time.inputstr() A time string (in local time).
string time.format(7) Indicates the format of the time string, by using the substitution symbols %U xxx [, lang ].
Return values
The UTC long format value.
-1 Error.
Context
This function can be used in all script types.
Regards
manish_patel
17th August 2016, 15:58
string time should be in hhmmss format. If ss is not availble add 00 to make it in hhmmsss.
After that, convert it to long using lval() and then pass this value to below function.
extern domain tctime tcqms.dll0001.time.to.num(long trans.time)
Example:
0530 -->lval(053000)-->53000
tcqms.dll0001.time.to.num(53000) will return 19080.