dwynn
July 3, 2020, 3:32pm
1
I am using Asp.net Maker 2020
Under CustomTemplateHeader, I follow this sample code to display Date and Time but it does not work. Please let me know the correct one for Asp.net Maker:
\
@DateTime.Today.ToString("d MMM yyyy")
{{:CompanyName}}
{{:Address}}
{{:City}}
{{:Country}}
Attn: {{:ContactName}}
\
\
Thank you.
If by “does not work” you mean the time is not showing, you can use @DateTime.Now.ToString (“d MMM yyyy hh:mm”)
dwynn
July 3, 2020, 8:32pm
3
I would like to show the date under this format: 07/03/2020
I tried:
Date : @DateTime.Now.ToString("mm/dd/yyyy")
and it showed:
Date : 28/03/2020
Please help so I can display date as:
Date: 07/03/2020
Thank you.
You can write it as @DateTime.Now.ToString (“MM/dd/yyyy”)