FormatTimeRemaining

Format Time Remaining

Minor Business Rule

Object Name: B1700285

Parent DLL: CCRIN

Location: Client/Server

Language: C

B1700285 - Format Time Remaining

1.Functional Description


This business function will format the time remaining field for output.  This function will serve as a wrapper function for time remaining of less than 

1,000,000, in which case it will call B1700280, to complete the formatting.  

.


1.1Purpose

The purpose of this function is to format time in an HH:MM:SS format when time remaining is greater than 

1,000,000 string length is greater than 9 (8 for HH:MM:SS + Null terminator).


1.2Setup Notes and Prerequisites

N1700810 must be used to derive the Math_Numeric Work Time for Time Remaining.


1.3Special Logic

if time remaining is less than 1,000,000 call B1700280 to pad 0's where applicable

else use B1700285 (this function) to display excess hours (greater than or equal to 100).


2.Datastructure

Type                             Variable Name                                                          I/O

MATH_NUMERIC      mnTimeRemaining_MATH01;                                 I              

  char                           szFormattedTimeRemaining_DS20[21];               O

  char                          cMode_EV01;                                                           Not Used                  

  char                          szErrorID_DTAI[11];                                                 Not Used      

  char                            cSuppressError_EV01;                                           Not Used           

  char                            cErrorCode;                                                              Not Used


3.Logic

If mnTimeRemaining_MATH01 is less than 1,000,000

       Call B1700280 (This will pad string with appropriate 0's for HH:MM:SS display)

Else

    Get the total length of the Math_Numeric String

    Subtract 4, for MM and SS

    Copy the remaining string segment from the left, since this is the total hours left to string output

    add ':' to string output

    Copy MM to string output

    add ':' to string output

    Copy SS  to string output


Data Structure

D1700285 - Format Time Remaining

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTimeRemaining_MATH01MATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

szFormattedTimeRemaining_DS20DS20charOPTNONE

A 20 character generic description.

cMode_EV01EV01charOPTNONE

An option that specifies the type of processing for an event.

szErrorID_DTAIDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cSuppressError_EV01EV01charOPTNONE

An option that specifies the type of processing for an event.

cErrorCodeERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

Related Functions

None

Related Tables

None