Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

MT Conversion

Description 

The MT code is used to convert time notations such as 01:40:30 or 1:30 AM between internal and external format. It takes the general form: 

MT{H}{S}

 where: 

  • H specifies 12-hour format. If omitted, 24-hour format will be used.
  • S specifies that seconds are to be included.

 

Time is stored internally as the number of seconds since midnight. The stored value can be output in 12 hour or 24 hour (international) format.

12:00PM is defined as noon and 12:00AM is defined as midnight.

For output conversions, AM and PM designators are automatically displayed. For example: 09:40AM and 06:30PM.

 

Input Conversion 

Input conversion is valid. Generally, for selection processing you should specify MT codes in field 7 of the data definition record.

AM or PM designators are taken into account. The result of the input conversion for certain values can be affected by the time_is_hours emulation setting.

 

EXAMPLES

Input Conversion

Code
Input
Result
MT
00:00
0
MTH
12:00AM
0
MT
01:00AM
3600
MT
01:00
3600
MTH
01:00
3600
MTH
01:00AM
3600
MT
01:00PM
46800
MTH
01:00PM
46800
MTS
01:00:30
3630


Output Conversion

Code
Source Value
Result
MTS
0
00:00:00
MTHS
0
12:00:00AM
MT
3600
01:00
MTH
3600
01:00AM
MT
46800
13:00
MTS
46800
13:00:00
MTH
46800
01:00PM
MTHS
46800
01:00:00PM


Back to Conversion Processing

Was this article helpful?