How to add hh:mm:ss in the received date from email

Hi

I am receiving date as - CDate(mail.Headers(“date”)).toString(“yyyy-MM-dd”)

from email but I want to add “_hh:mm:ss” as well above.

So the final output should be “2022-11-10_06:20:30”

Can someone please help with this.

Regards,
Gokul

Hi,

How about the following?

CDate(mail.Headers(“date”)).toString("yyyy-MM-dd_HH:mm:ss")

Regards,

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