I'm experiencing a problem that is driving me nuts. Basically, I'm sending
an email to a user upon purchase order posting.
I have a method that retrieves the date from the VendPurchOrderTrans and
then it will inject them into the email template I created.
The date I want to show in the email should be in following format: 6/25/2010.
Instead I get 2010/25/6 and I truly don't know how to do it in X++.
Is this an X++ format solution or is this something related to a place holder?
Thank you!
Please take a look at the following (global) method
str date2Str(
date date,
int sequence,
int day,
int separator1,
int month,
int separator2,
int year)
From the help, here an example:
The following example prints today's date in the format day/month/year, with
2 digits for each of the values.
static void date2StrExample(Args _arg)
{
date d = today();
str s;
;
s = date2Str(d, 123, 2, -1, 2, -1, 2);
print "Today's date is " + s;
pause;