Convert string with date and time to string of date

How to convert string 07/31/2022 22:54:23 into 31 Jul 2022

HI @tharani.natarajan

Try with this expression

DateTime.ParseExact("07/31/2022 22:54:23","MM/dd/yyyy HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture).ToString("dd MMM yyyy")

Regards
Gokul

1 Like

grafik
CDate(YourStringVar).toString("dd MMM yyyy")

Hi @tharani.natarajan

image

1 Like

@tharani.natarajan
to complete the serie of options:
grafik

1 Like

you Guys are awesome ! Thanks for providing wide variety of options to choose from .

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