I’m reading an excel file and sending it as an html email message. one column is coming over as datetime like this 1/24/2020 00:00:00, I’ve tried many ways to convert/format this to just date in excel before I email it but seemingly I cannot figure out how to do this. I want that column when it emails to just be 1/24/2020. Found a few posts about converting but I just cant seem to figure out how to just convert that one column in my data table, any help would be appreciated.
You dont convert a column, you just convert to text when you want to write it somewhere like this:
So what is the best way to read a range in excel, I have a dynamic range built already using a variable
What is the best way to read those datetime values and then write over them with just the date?
write them over where? in excel is better to have as date type…
Either in excel or directly into a datatable, what i’m doing is inserting this data table (which is just a read range of an excel sheet) into the body of an email and it keeps coming over as datetime when the email is sent.
but how are you writing from excel->DataTable->Email?
DT is the read range from excel, this screenshot converts it over to HTML for inserting into the body of an email. Prior to inserting this into the email I need to figure out a way to change the 1 column that keeps coming over as datetime, hope this makes sense and thanks for the help.
IF headers.ColumnName = "MyDateColumnName" "<td>" + row("DateColumn").ToString("M/dd/yyyy") + "</td>"
@db44 You’ll need to use a For Each Row activity to set the value for each row in the column (or set the values to a new column and delete the original column).