Hello! I need yesterday’s date in dd.mm.yyyy format, please help
Thank You! I found something like this: DateTime.Now.AddDays(-1) but I don’t know where to add the format
1 Like
Use this in wherever you need this format.
DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy")
For example you can print this using MessageBox
. Put this code in text to print.
Sample Code:
Yesterdays Date.zip (142.8 KB)
Thanks,
Ashok
1 Like
Hie @sullivanne
try this method
now.AddDays(-1).ToString(“dd.MM.yyyy”)
1 Like
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.