Hello,
I am using the send email widgit.
I have a date field in the body of the message and it sends the date and time.
Is there an easy way to format it to show only date?
Hello,
I am using the send email widgit.
I have a date field in the body of the message and it sends the date and time.
Is there an easy way to format it to show only date?
YourDateVariable.ToString("MM/dd/yyyy")
I tried that and got
Ah, my apologies. Forgot the nullable date time was different.
AdjDate.Value.ToString("MM/dd/yyyy")
Edit: If you are worried that the date will ever be null, use this instead:
AdjDate == null? "[N/A]": AdjDate.Value.ToString("MM/dd/yyyy")
How in the world did you know it was nullable?
In Epicor Functions, the only Date type request parameter is the nullable (DateTime?
rather than DateTime
). So literally every time I make a function with a Date input, I get that same error because I forget about the nullable