time2Str Function [AX 2012]

Updated: December 10, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Converts a timeOfDay value to a string that includes hours, minutes, and seconds.


str time2Str(
    int _time,
    int _separator,
    int _timeFormat)

Parameter

Description

_time

A timeOfDay value.

_separator

A TimeSeparator enumeration value that indicates the characters between the hours, minutes, and seconds in the output string.

_timeFormat

A TimeFormat enumeration value that indicates whether a 12-hour or a 24-hour clock is used.

A string that represents the specified time.

The value of the _time parameter is the number of seconds since midnight.

static void TimeJob4(Args _args)
{
    timeOfDay theTime = timeNow();
    ;
    info( time2Str(theTime, TimeSeparator::Colon, TimeFormat::AMPM) );
}

/**
Message (04:33:56 pm)
04:33:56 pm
**/

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: