View Single Post
Old Apr 18th, 2008, 11:57 PM   #2
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,031
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: Command line date math

What exactly is it you need this for? It sounds to me like you will need to use an actual programming language; using (for example) C# makes it pretty easy:
C# Syntax (Toggle Plain Text)
  1. DateTime yesterday = DateTime.Today.AddDays(-1.0);
You can then use the Day, Month, etc properties to get the actual information you need. It's extremely simple. In fact, I think the hardest part will be getting the information to your batch file, though piping or using the errorlevel may serve the purpose.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote