Cannot convert string to datetime

String: 30/10/2018 11:06:30 AM

I have tried the below codes but it isn’t working. Pls help

row(“LogTime”)(“dd/MM/yyyy HH:mm:ss”)
Convert.ToDateTime(row(“LogTime”).ToString).ToString("dd/MM/yyyy HH:mm:ss”)
DateTime.ParseExact(row(“LogTime”).ToString, "dd/MM/yyyy HH:mm:ss”, System.Globalization.CultureInfo.InvariantCulture)

Thank you xoxo

DateTime.ParseExact(“30/10/2018 11:06:30 AM”, “dd/MM/yyyy HH:mm:ss tt”,

1 Like

@KarthikByggari it gives me error

What @KarthikByggari suggested, that works well, how are you accessing the Date later?


I am accessing the value in a excel sheet which is generated from a system.

Can you attach workflow

Hi @PrankurJoshi , I have attached sample workflow and excel

Main.xaml (9.0 KB)
11.xlsx (52.9 KB) (48.1 KB)

please find attached flow

1 Like

@kirti.iyer thank you :slight_smile:

the answer code given in the xaml file:
DateTime.ParseExact(row(0).ToString,“dd/MM/yyyy hh:mm:ss tt”,Nothing).ToString(“HH:mm:ss”)

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