Showing only the time in email from Excel

Hi guys,

I have an example of an output shown in my email, which i kept getting “12/30/1899 09:00:00”. I am getting my data from Excel File and placed it in the email. The date i get is always there, but the timing is different depending on what time i put in my excel. Looking at this, how do i only show the timing only, for example, “9:00 AM”? Feel free to use my materials below:

EmailTemplate.txt (424 Bytes)
StudentInfo.xlsx (9.9 KB)
eventInvitation.xaml (11.8 KB)


Use above format to change into Time format.


Umm…the thing is if you looked at the project file, i have used what you have shown here. But i’ll still get this back in my email.

1 Like

Hi @purpleBora94

Add in body of Outlook

String.Format(initialLetter, Name, AdminNo, Location, dateOfEvent, Date.Parse(timeOfEvent).ToString(“hh:mm tt”), School)

1 Like

Alright that was what i was missing. Thank you and cheers! @mitesh_parmar

1 Like

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