Mail time extraction issue

Hello ,
I am using below expression to extract time of mails.But i am not able to extract exact time. mm is always incorrect .
Convert.ToDateTime(item.Headers(“Date”)).ToString(“dd-mm-yyyy”)

i am trying to create folder depending upon the mail time but the mm is wrong.

image

thanks
navneet

@Navneetj3
For DateTime formatting MM is month and mm is minute. “dd-MM-yyyy” is what you should be using.

1 Like

@DanielMitchell Thanks .it was silly one.

1 Like

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