Salesforce

How Do I Calculate a Date Value that Is Stored in a String? (Magic xpi 4.7)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Calculate a Date Value that Is Stored in a String? (Magic xpi 4.7)

In most cases, Magic xpi will handle date conversion issues for you. That is, when you are displaying a date on a form, reading a date with a form, or reading it from a data source, you don’t need to manually do the conversion. There are a few scenarios where you may have to parse a string to extract the date, however.

In those cases, you need to use the DVal() function. This function uses pictures to interpret the string and find its date equivalent. It is up to you to be sure that the picture matches the date format in the string. For instance:

Expression

Result

DVal('06/30/07', 'MM/DD/YY')

A date value that represents this date, such as June 30, 2007

DVal('06/30/07', 'DD/MM/YY')

0

See also: How Do I Convert a Date Value to a String?

Reference
Attachment 
Attachment