KeyValuePair(of String, String) cannot be converted to String

KeyValuePair(of String, String) cannot be converted to String

Hi @Suyash_Kompalwar

Check the below thread:

Regards

pleas share some more details from the modelling with us. Eg. from where the KeyValuePair is coming from (Loop over a dictionary)?

@Suyash_Kompalwar,

You should be using expression like this:

If your variable to store the output of this expression is DateTime then use this:
dtmVariable = DateTime.Parse(BirthdaysDict(Name).ToString)

If string variable use this:
dtmVariable = DateTime.Parse(BirthdaysDict(Name).ToString).Tostring

Thanks,
Ashok :slight_smile:

What type is the variable Name? Please make sure that it is String and not KeyValuePair.

If your dictionary is string/string then why are you doing datetime.parse and then converting back to string? Just BirthdaysDict(Name) will get you the string value.