I am using System.DateTime.Today.AddDays(-1).ToString(“d/m/yyyy”)
command but I am getting month as zero every time. Can anyone suggest to me what changes I should make in the above syntax so I can get the correct Date?
Can you try as the following?
note: m means minute, M means month.
you can try like this instead of that
The issue is not resolved yet still facing the same problem even after changing to dd/mm/yyyy.
Thank You for Instant Reply
I tried what you suggested but got output like this 21/17/2022.
can you tell me format of output you expecting ?
mm should be upper case
should be “M”
The “m” - Minute
The “M” - Month
Thank You, Yoichi,
Your suggestion worked for me. Got the correct result.
Yes. Got the mistake that I committed.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.