I’m trying to get the date and month value of a datetime variable without leading 0 but when I try formatValueDate.ToString(“d”) or formatValueDate.ToString(“M”) it always return the full date instead. Any advice?
Hi,
Can you try to add % like “%d”?
Please see the following in details.
Or DateTimeVar.Day.ToString or DateTimeVar.Month.ToString will also work
Regards,
Hi @QTH
Can you try this expression
formatValueDate.ToString("dd").TrimStart("0"c)
formatValueDate.ToString("MM").TrimStart("0"c)
Regards
Gowtham.K
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.