Salesforce

DVal (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DVal (Magic xpi 4.5)

Converts a date entered or stored as a character string to a date value. The date value is a numeric value that represents the number of days elapsed since the day before the first day of the 1st century (01/01/01) until the date that is being converted.

Syntax:

DVal(Alpha date, Alpha picture)

Parameters:

date: A character string or an Alpha expression that can be interpreted as a date (for example, '01/01/09', 'Jan 1, 2009').

picture: The format for datestring. This parameter is required for Magic xpi to read and interpret the character string or expression. For a full description, see Picture Formats.

Returns:

Date value.

Examples:

DVal('01/01/01','MM/DD/YY') and DVal('Jan 1, 2001','MMM D,YYYY') each returns '01/01/2001'Date.

DVal(A,vMMMMMMMMM DD, YYYY') where variable A contains 'January 12, 2002' also returns '12/01/2002'Date.

Note:

If picture does not correspond to the format of datestring, the function returns 0.

See also:

DStr, How Do I Calculate a Date Value that Is Stored in a String?

Reference
Attachment 
Attachment