StringOrNumericMMDDtoDate

Convert String or Numeric to MMDD to Date

Minor Business Rule

Object Name: N0800041

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

Purpose

Take a string in the following forms, MDD, MMDD, or M/DD, and convert it to the Month/ Day form, 

MM/DD.  It will also convert from the above forms to MMDD for storing in a numeric field.   


Setup Notes and Prerequisites

Pass the Named ER a string in any of the above forms, and the numeric date, MMDD, and the sting date, 

MM/DD, will be passed back. 


Special Logic




Technical Specification

 A numeric date in the form MMDD is converted to the string form MM/DD.  A date in the string form 

MM/DD is converted to numeric MMDD.  Both forms are returned.


 Return the length of the string

If the string length is 3 then the first char. is the month, the second and third are the day.  Place 

'/' between them.

If the second character is a '/' then the first one is the month, the 2nd is / and the third is 
the day

End If
End If

If the string length is equal to "4.00"

 Return the second Char., if it is a '/'  then the first char. is the month, the third and 
fourth are the day.  

Else

If the third is / then the first two are the month and the fourth is the day
 Else

The first two are the month and the last two are the day.
End If

End If

If the string length is equal to 5

The first two are the month and the last two are the day, the middle one is a '/'.
End If


Data Structure

D08395 - Convert String to Date MM/DD

Parameter NameData ItemData TypeReq/OptI/O/Both
szAlphaSpecData05AA05charNONENONE

This item is used scrub Specification Data fields that are 5 character alpha fields.

mnMathNumeric01MATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

Related Functions

None

Related Tables

None