In my order-mail-template I would like to format the order date into MM-DD-YY. Can this be done with DW tags? Right now <!--@Ecom:Order.Date--> returns MM-DD-YYYY.
I'm on DW version 8.1.2.6, so I cannot use Razor.
In my order-mail-template I would like to format the order date into MM-DD-YY. Can this be done with DW tags? Right now <!--@Ecom:Order.Date--> returns MM-DD-YYYY.
I'm on DW version 8.1.2.6, so I cannot use Razor.
Hi Filip
You can use the date tag extensions:
Nicolai
Like so?
<!--@Ecom:Order.Date.FormatDate("dd-MM-yy")-->
But this only works with 8.5+, right?
Try this link: http://templates.dynamicweb.com/TemplateTags/Dynamicweb-template-tags/General-tags/Date/time-tag-extensions.aspx.
Use them like this
<!--@Ecom:Order.Date.Year-->, <!--@Ecom:Order.Date.Month-->, …
Best regards,
Mikkel
Thanks Mikkel, but *.Year returns "2014" not "14". Looks like I'm out of luck.
Hi Filip
You can see the list of possibilities on the link we provided you. You can also use DwTemplateTags to see what is in the copntext you are in.
You can always make an upgrade and get new features. We cannot move new features to your old version, sadly enough...
Why don't you want to report the year as 2014? We live in the year 2014 and more than 14 years ago we realized that we should use 4 digits to represent this fact.
Have you tried using <!--@Ecom:Order.Date.Year.Remove(2)-->?
Thanks Nicolai and Mikkel. @Mikkel: The mail is not for humans, but for another system to receive - so the date format is important.
<!--@Ecom:Order.Date.Year--> - will have to do for now. Thank you for your input.
You must be logged in to post in the forum