I would like to get the 3 dates from the current date or if user enters a date like 16/07/2011 i would like to show the 3 previous dates for this like
15/07/2011,14/07/2011,13/07/2011
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simple steps:
DateTime. If you know the format to be used, I would suggest usingDateTime.ParseExactorDateTime.TryParseExact.DateTime.AddDays(-1)to get the previous date (either with different values from the original, or always -1 but from the “new” one each time)For example: