Coversion of date

Hi All,

I have date like 20/01/2020 . how can I covert this into 20012020
how to remove that / in date ?

hi @Nagendra_Rajas

You can use this - Convert.ToDateTime(dt.ToString(“ddMMyyyy”)) , where dt is DateTime variable.

(or)
dateInput = 20/01/2020
Date.ParseExact(“dd/mm/yyyy”,dateInput.ToString.Trim,System.Globalization.CultureInfo.InvariantCulture).ToString(“ddMMyyyy”)

Please find the attached xaml for you reference.DateConversion.xaml (5.4 KB)

Thanks
Latika

3 Likes

@Nagendra_Rajas

Convert.ToDateTime(Date).ToString(ddMMyyyy)

@Nagendra_Rajas

Convert the given date to string

And use use the operation to remove the “/”

String variable.Replace(“/”, “”)

Hope it helps
Nived N

2 Likes

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