Topic Path: Symbol Reference > Functions > AS400Date Function
ContentsIndexHome
PreviousUpNext
AS400Date Function

Converts an AS400-formatted date from a string to a native data type.

File
function AS400Date(
    const AData: String
): TIdDateTime;
Parameters 
Description 
AData 
Type is String. 

TIdDateTime - Date/Time value for the string representation of the date.

AS400Date is a TIdDateTime function used to convert the value in AData from its representation as a date in AS400 format to the datat type for the return value. 

Values in AData are examined to locate the delimiters that separate the month, day, and year components in the argument. When no delimiters (non-numeric values) can be located the return value for the function is an empty date value (0.0). 

Date components in AData are expected to be in Day, Month, and Year order, but are adjusted when any value is detected that exceeds the normal range for the date component; for example, when the Month number exceeds 12 or the Day number exceeds 31. 

The Year component may be expressed using 2 or 4 digits. AS400Date calls Y2Year to force the year component to include the Century in the Year.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.