I have been trying to extract data from an excel sheet and putting into an outlook email, but i keep getting outputs like the above pictures. Any idea how to fix it?
@TOBIAS_TOH_TENG_KIAT While using Read Range or Read Cell use preserve format checkbox checked then it will give you a date in the same format which is displayed in Excel.
It still give me the same replies but lesser emails.
@TOBIAS_TOH_TENG_KIAT - Pleas try
row(“Due Date”).tostring(“MM-dd-yyyy”) or row(“Due Date”).tostring(“dd-MM-yyyy”) …
gave me an error saying “Option Strict On disallows conversions from String to Integer”
@TOBIAS_TOH_TENG_KIAT - Sorry it was my bad…I gave the incorrect code
DateTime.ParseExact(row(“Due Date”).ToString,“MM/dd/yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).Tostring(“MM-dd-yyyy”)
or
DateTime.ParseExact(row(“Due Date”).ToString,“dd/MM/yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).Tostring(“dd-MM-yyyy”)
Input and Output
Code Used
DateTime.ParseExact(row(“Date”).ToString,“MM/dd/yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).Tostring(“MM-dd-yyyy”)
Is there any other ways to contact you? I’m having exceptions error
@TOBIAS_TOH_TENG_KIAT - You can click on my name , and Choose “Message” , that will send the PM to me.