Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Silverlight 4
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 22nd, 2011, 02:51 AM
Authorized User
Points: 566, Level: 8
Points: 566, Level: 8 Points: 566, Level: 8 Points: 566, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 96
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
http://i67.photobucket.com/albums/h2...ono/THIS-1.png
How would it be done in C#?


trying the addmonth method with a negative one did not work
http://i67.photobucket.com/albums/h2...didnotwork.png
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06:35 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 02: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 04:55 AM



All times are GMT -4. The time now is 07:02 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.