Welcome Guest Search | Active Topics | Members | Log In | Register

using %date% function without day Options · View
adellos
Posted: Thursday, May 14, 2009 2:46:00 PM

Rank: Administration
Groups: Administration

Joined: 10/28/2008
Posts: 75
Points: 251
for /F "tokens=2*" %? in ('date/T') do set CDATE=%?

This code will take the %date% function and remove the day and keep the number with seperators... Variable will be %cdate% not %date%

Example:

BEFORE NEW CODE

echo %date%
Thu 05/14/2009

AFTER NEW CODE

echo %cdate%
05/14/2009

Adam D. Technology
Adam Dellos
adellos@adamdtechnology.com
(520) 591-3891
http://www.adamdtechnology.com
"We give you twice the work in half the time and leave you with a peace of mind!"
Sponsor
Posted: Thursday, May 14, 2009 2:46:00 PM
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.219 seconds.