Jump to content

Recommended Posts

Posted

how can i set the date to 01\01\03 then back to the date its sposed 2 be? (like todays date or whatever)

thanks :)


Posted

To get the todays date as a file, you can use this,

echo %DATE:~0,10% > c:\DATENOW.txt

Then you'll get today's date as a file.

And when you want the date BACK again,

simply do

DATE < c:\DATENOW.txt

This works for me!

If you only want the YEAR,

echo %DATE:~0,4%

If you only want the MONTH,

%DATE:~5,2%

If you only want the DAY,

echo %DATE:~8,3%

Change the parameters to fit your needs!

Posted

i cant get it 2 import the date again :s your command isnt working 4 me

it complains about the date format

Posted

whmm, I wonder why it didin't work for you.

But I guess nakira's way is a lot easier and doesn't fiddle around with making files.

My way is another way but can work for other other batch files other than the one it made. Although, I don't think a DATE stuff would e needed any longer than 24 hours! Try it for the TIME method if one needs it. GreenMachine @ EXCREATE forum is better at handling those kinds of things so ask him when he's got time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...