Get date and remove the leading theres a loading 0 remove it


I want to remove the leading zero from the date
I have the below that returns “02 Jun”

i want it to return “2 Jun”

Is there a very simple way of doing this without regular expression

DateTime.Now.ToString(“dd”) + " " + DateTime.Now.ToString(“MMM”)

Have a look here:

1 Like

If MyText is the string “02 Jun”, you can assign a variable to the following: MyText.TrimStart(New Char() {"0"c}).


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.