Get date without 0 in single numbers

Get date as 21/7/2020

not as 21/07/2020

how to remove the zero before single digits date and month

Hi @Sweety_Girl

Now.toString(“dd/M/yyyy”)

Or
If MyText is the string “21/07/2020”, you can assign a variable to the following: MyText.(New Char() {"0"c})

Thanks
Latika

1 Like

@Sweety_Girl
Please try this.

Regards,
Krishna

1 Like

@Sweety_Girl Format your variable using Format d/M/yyyy
DateTime.ParseExact("21/07/2020","dd/MM/yyyy",Nothing).ToString("d/M/yyyy")

3 Likes

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