Solved

c# build String

Posted on 2011-03-02
3
455 Views
Last Modified: 2012-05-11
Need to populate a variable dynamically so that it...

1.  Shows PREVIOUS month with 3 letters
2.  And year associated with previous month  

Example - expected format as of Feb, 2011:
Jan2011.zip

Thank you kindly!
0
Comment
Question by:carsRST
  • 2
3 Comments
 
LVL 16

Author Comment

by:carsRST
Comment Utility
And in January of this year the format would be...

Dec2011.zip
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
DateTime t = DateTime.Today.AddMonths(-1);
string t = t.ToString("MMMyyyy") + ".zip";
0
 
LVL 16

Author Closing Comment

by:carsRST
Comment Utility
excellent.  Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
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…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

13 Experts available now in Live!

Get 1:1 Help Now