Official Content

Saves a date type field in the current record of the delimited ASCII file. If it has GeneXus null value, the date "00/00/0000" will be saved.

Syntax

DFWPDate(date [ , fmt [ , sep ] ] )

Where:

date
    It can be an attribute or variable of the date type. The read value will be saved here. It cannot be a constant.

fmt
    It can be an attribute, variable or constant of the character type, optional, with at least three characters. It indicates the format of the date in the field to be saved. Each character of the field may have a “y”, “m” or “d” value. Its combination generates the format. For example, if the string contains the “ymd” character, the field date to be saved is assumed in Year, Month, Day format. If, on the contrary, the string contains the “dmy” characters, the field date to be read is assumed in Day, Month, Year format. It is important to note that the characters should be in small letters. The default value is “ymd”.

sep
    It is a parameter of the character type, optional, with  at least one character. It indicates the separator element of a date. Commonly used values are “/”, “-“ and “.”. The default value is “-”.

Type Returned:
Numeric

Scope

Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET.NET FrameworkJava, Ruby (up to GeneXus X Evolution 3)

Values

Value

Result

Description

0

Successful operation

The field has been read.

-1

Wrong sequence

It occurs when this function is called before calling the dfwopen function, or when the last call to dfwopen returned a value other than zero (error). If the trace is enabled, you will see the ADF0004 message.

-5

Wrong format

The string in the field does not have the right format. This is mostly because the field you are trying to read is of a different type (number, date, etc.).

-10

Wrong format

The fmt parameter has a wrong format. If the trace is enabled, you will see the ADF0012 message.

See Also

Delimited ASCII Files Functions










Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant