Change the formate of date

Hi,

I need a date of the format mm.dd.yyyy and it should be 16 days less than current date.I am trying but the date is coming in the format mm/dd/yyyy along with time.

Hey @pug

you can try this and let me know :slight_smile:

DateTime.Now.AddDays(-16).ToString(“MM.dd.yyyy”)

Regards…!!
Aksh

1 Like

Thanks @aksh1yadav.It worked

Any specific reason for MM to be in caps?It was not working with “mm”

Regards,
PUG

hey @pug

mm is for minute while MM is for month

Regards…!!
Aksh

2 Likes