Solved

DateTime.Now.ToShortDateString() and subtract 6 months

Posted on 2009-07-01
4
596 Views
Last Modified: 2013-12-17
I am using DateTime.Now.ToShortDateString() to return todays date.

How am i able to use DateTime.Now.ToShortDateString() and subtract 6 months from it?
0
Comment
Question by:Mr_Shaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 22

Assisted Solution

by:p_davis
p_davis earned 166 total points
ID: 24755534
DateTime.Now.AddMonths(-6).ToShortTimeString();
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 166 total points
ID: 24755540
have you tried:

DateTime.Now.addmonth(-6).ToShortDateString()
0
 
LVL 9

Accepted Solution

by:
Rahul Goel ITIL earned 168 total points
ID: 24755554
Here is the solution
DateTime.Now.AddMonths(-6).ToShortDateString()

Open in new window

0
 

Author Closing Comment

by:Mr_Shaw
ID: 31598812
thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

623 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