Solved get current date minus a day

Posted on 2009-02-20
Last Modified: 2012-05-06
Hey All,

I am getting the current date like so: DateTime.Today.ToString("yyyyMMdd") What I want to do is get the current date but minus 1 day so:

Today: 20/02/2009 but I want the 19/02/2009

How can I do this in
Question by:richard_gar
    LVL 38

    Accepted Solution

    LVL 38

    Expert Comment


    Maybe an A grade would have been a better choice?  The answer was complete, and self-explanatory.

    Please see the help on the grading policy.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now