Variable String Date in exel

hi
read date in exel file ( date is formula). the date is in dd.MM.yyyy format.
with for each and assign, variable type string = row.item("namecolumn).tostring
output in write line line is m/dd/ayy :hh:mm:ss how can i only deduce the date in format dd.MM.yyyy?

Hi @pl.rusinov ,

Could you try with the below Expression :

strVar = CDate(row("namecolumn").ToString).ToString("dd.MM.yyyy")

HI @pl.rusinov

You can try with Format cell activity or you can try with Date expression

DateTime.ParseExact(YourInputString,"dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture).Adddays(1).ToString("dd.MM.yyyy")

Regards
Gokul

Hi @pl.rusinov

Same like this

DateTime.ParseExact(str1,{"dd.MM.yyyy","MM/dd/yyyy hh:mm:ss","dd/MM/yyyy hh:mm:ss","dd-MM-yyyy","dd.M.yyyy","M/dd/yyyy hh:mm:ss"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).AddDays(+1).ToString("dd.MM.yyyy")

Regards
Sudharsan

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