Conversion of Time in AX2009

/// Try this in your AOT Jobs
 static void timeConversion(Args _arg)
 int s;
 str t, convertedTime;
// t is a String and we assigned Some Time Value as 11 hr 50 mins and Zero seconds
 t = "11:50:00";
// s is an Integer, and its Converting time value into Seconds value for Example 1hr mean it wil calculate
 // seconds as 3600
 s = str2time(t);
// convertedTime is a String and its Converting the Seconds Value into Time
 convertedTime = time2str(s, Timeseparator::Colon, TimeFormat::Hour24);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s