====== OConv Time (MT) function ====== ==== Description ==== Converts a value from internal storage format to a time output format. Internal system time is saved as the number of seconds past midnight. A 24-hour day has 86,400 seconds. Any value over that number is divided by 86,400, and the remainder is the value of //expression//. ==== Syntax ==== //output// = **OConv**(//expression//, "**MT** [//H//] [//S//] [//char//]") ==== Parameters ==== OConv (MT) takes the following arguments for its parameters.\\ \\ ^Parameters^Description^ |//expression//|Must be either an integer or a variable that contains an integer.| |MT\\ \\ - or -\\ \\ MTX|Indicates a time conversion.\\ \\ MTX is used for international default conversions. Requires that a language is set in the environment, in field 15 (@environ.set ), eg LND_GERMAN_D, LND_FRENCH_F, etc. The language needs to be set within the SYSENV record prior to start.| |//H//|Specify 12-hour format. The characters used to indicate AM and PM are identified by the default language set.| |//S//|Indicates that output includes seconds.| |//char//|Specifies the character that separates hours, minutes, and seconds. The default is a ":" (colon). It can be any character between ASCII characters 33 and 248 inclusive.| ==== See Also ==== [[time|Time()]], [[iconv_time_mt|IConv Time (MT) function]] ==== Examples ==== The following table provides examples of the correct use of the OConv Time function. ^Example code^Output^ |OConv(43260,"MT")|12:01| |OConv(43260,"MTH")|12:01PM| |OConv(43260,"MTS")|12:01:00| |OConv(43260,"MTHS")|12:01:00PM| |OConv(61200,"MT")|17:00| |OConv(61200,"MTHS,")|05,00,00PM| * Converting to time output format. * The value 08:28PM is saved in TIME. INTERNAL_TIME = "73680" Conversion = "MTH" TIME = OConv(INTERNAL_TIME, Conversion) When the language is set to LND_FRENCH_F, the following is observed * dd will contain 14.48 bb = Oconv(time(), 'MTX')