str2Time Function
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Converts a string to a timeOfDay value.
int str2Time(str _text)
Parameters
Parameter |
Description |
---|---|
_text |
The time to use to calculate the number of seconds since midnight. |
Return Value
The number of seconds between midnight and the _text parameter; otherwise, -1.
Remarks
str2Time("05:01:37") //Returns the value 18097.
str2Time("7 o'clock") //Returns the value -1.
Example
static void str2TimeExample(Args _arg)
{
int i;
;
i = str2Time("11:30");
print i;
pause;
}
See also
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).