Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Silverlight 4
Silverlight 4 Discuss Microsoft Silverlight 4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Silverlight 4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 22nd, 2011, 02:51 AM
Friend of Wrox
Join Date: Jun 2005
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Default How do I get a dattime format in C# that will look like this:

How do I get a dattime format in C# that will look like this:
2011-09-01 00:00:00:000
This works
DateTime saveNow = DateTime.Now;

string test = String.Format("{0:yyyy-MM-01 00:00:00:000}", saveNow);
Now I want to know this. How would I subtract one month from the current month?
It T-SQL it would look like this
How would it be done in C#?

trying the addmonth method with a negative one did not work

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a dattime format in C# that will look like this: Bill_Thompson Silverlight 4 0 September 22nd, 2011 12:36 AM
Sending xml format through email, format issue!!! abhishekkashyap27 ASP.NET 2.0 Professional 0 December 14th, 2010 07:35 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
Convert Rich Text Format to Ordinary Format in ASP Andraw Classic ASP Basics 1 August 31st, 2007 10:05 AM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.