Jump to content

Format Date in a tagged text file


joebaird

Recommended Posts

Posted

Hello,

I am creating a template that has 6 possible disclaimers that are pulled in based on the data file. I need to know if i can format the date to read as the following sample (July 3, 2013) no matter how the data file is set up. Below is a sample of the disclaimer tagged text file that I will be using, i need to format the Offer_Start and Offer_End fields. I know the java script that will do this in a rule, but not sure how to do it in a tagged text file.

Any help would be appreciated.

 

Sample disclaimer: In order to qualify for this bonus Rewards offer, you must make $150 in net purchases (less returns and exchanges) with your MasterCard<superscript>&reg</superscript> at ***X, ***X stores or online, or everywhere else MasterCard<superscript>&reg</superscript> is accepted with your MasterCard between <variable name=Offer_Start> - <variable name=Offer_End>, that post to your account by <variable name=Offer_End>.

Posted

VERY easy to do...

Assuming that the user will enter the date into a field called "Date", here's the rule:

return FormatDate(DateFromString(Field("Date")), "lm dd, yyyy");

I had "03/05/98" as the data in the field «Date» and the rule returned "March 05, 1998"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...