Assign: String was not recognized as a valid DateTime please let me know how to fix this?


Any solution for this?

Hi,

Can you share content of todt variable?

Regards,

10-10-2022 this is what i give input in dialog box that will store in todt variable

Hi,

Can you try Trim method like Convert.ToDateTime(todt.Trim) ?
If it doesn’t still work, can you check actual content of it using WriteLine activity etc?

Regards,

sorry yoichi, actually im not familiar with trim so idk how to do it…could you please explain some other way to do it

Try to cast like Cdate(“strvariable”), it will convert it to date.

Hi,

For now, can you try to replace todt with todt.Trim as the following image?

Regards,

Thank you yoichi
but still error comes

HI,

Can you check actual content of todt variable. For example, can you try to put the following WriteLine activity just before the activity OR check Loacls panel when error occurs in debug mode?

image

Regards,

check the value as mentioned by Yoichi

Keep in mind and check the day position of the date string
When day is at first position parse it with DateTime.ParseExact
grafik

output comes like this

is this correct format?

Really im not familiar with date time .parse extract… sorry ppr

Hi,

Can you try to replace Convert.ToDateTime(todt) with the following?

DateTime.ParseExact(todt,"d-M-yyyy",System.Globalization.CultureInfo.InvariantCulture)

if the above doesn’t work, please add Trim like

DateTime.ParseExact(todt.Trim,"d-M-yyyy",System.Globalization.CultureInfo.InvariantCulture)

Regards,

Tqsm but may be there are some errors i guess


Can you try to replace the following red rectangle part with the above expression?

DateTime.ParseExact(todt,"d-M-yyyy",System.Globalization.CultureInfo.InvariantCulture)

Regards,

1 Like

Hi,

It seems matter of filter condition in O365 mail. I think it’s better to raise new topic with detailed information because it’s getting away from title of this topic.

Regards,

okay sure thank you so much… it means a lot to me yoichi will create new topic :slight_smile:

1 Like

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