?
Solved

vb.net get current date minus a day

Posted on 2009-02-20
2
Medium Priority
?
3,740 Views
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 vb.net
0
Comment
Question by:richard_gar
  • 2
2 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 1500 total points
ID: 23695206
DateTime.Today.AddDays(-1).ToString("yyyyMMdd")
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 23696083
richard_gar,

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.
http://www.experts-exchange.com/help.jsp?hi=403
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

621 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