Dates in logs from %DATE%

  • Thread starter Thread starter Adrian Marsh (NNTP)
  • Start date Start date
A

Adrian Marsh (NNTP)

I'm logging AT jobs, but different types of machines are reporting the
date in different formats, eg:

05/11/2004#SWOXPTEST
Fri 05/11/2004#SWOCMPQ01
Fri 05/11/2004#SWODELL02
Fri 11/05/2004#TESTLAPTOP2


SWOXPTEST Runs XP, but misses putting the "Fri" bit into the log
SWOCMPQ01 runs Advanced server, and works the way I want it to
SWODELL02 runs W2KPro, and work like I want it to.
TESTLAPTOP02 runs W2Kpro too, but returns a different date format.


All the AT jobs run as SYSTEM. All run with the command:
'echo "%DATE%#%COMPUTERNAME%" >> \\server\log$\log.txt'

How can I standardise the date ? I load up .reg files to correct the
local user timezone info, but can't see how to do this for the SYSTEM
account.

Adrian
 
Adrian Marsh (NNTP) said:
I'm logging AT jobs, but different types of machines are reporting the
date in different formats, eg:

05/11/2004#SWOXPTEST
Fri 05/11/2004#SWOCMPQ01
Fri 05/11/2004#SWODELL02
Fri 11/05/2004#TESTLAPTOP2


SWOXPTEST Runs XP, but misses putting the "Fri" bit into the log
SWOCMPQ01 runs Advanced server, and works the way I want it to
SWODELL02 runs W2KPro, and work like I want it to.
TESTLAPTOP02 runs W2Kpro too, but returns a different date format.


All the AT jobs run as SYSTEM. All run with the command:
'echo "%DATE%#%COMPUTERNAME%" >> \\server\log$\log.txt'

How can I standardise the date ? I load up .reg files to correct the
local user timezone info, but can't see how to do this for the SYSTEM
account.

Adrian

Check the date format in Date/Time in the Control Panel.
 
Answered 11/5/2004
--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Adrian Marsh (NNTP)"wrote:
| I'm logging AT jobs, but different types of machines are reporting the
| date in different formats, eg:
|
| 05/11/2004#SWOXPTEST
| Fri 05/11/2004#SWOCMPQ01
| Fri 05/11/2004#SWODELL02
| Fri 11/05/2004#TESTLAPTOP2
|
|
| SWOXPTEST Runs XP, but misses putting the "Fri" bit into the log
| SWOCMPQ01 runs Advanced server, and works the way I want it to
| SWODELL02 runs W2KPro, and work like I want it to.
| TESTLAPTOP02 runs W2Kpro too, but returns a different date format.
|
|
| All the AT jobs run as SYSTEM. All run with the command:
| 'echo "%DATE%#%COMPUTERNAME%" >> \\server\log$\log.txt'
|
| How can I standardise the date ? I load up .reg files to correct the
| local user timezone info, but can't see how to do this for the SYSTEM
| account.
|
| Adrian
 
Hi,

I need to apply this either as a .reg update across all PCs, or through
Active Directory. I'm already setting the local time through both, but
can't see where timezone info/date format is set.

Adrian
 
A simpler way might be to use a command that generates a
standardised output, e.g. now.exe (Win2000 Resource Kit).
Here are a couple of options:

now.exe by itself generates this output:
Mon Nov 15 21:53:13 2004

@echo off
for /F "tokens=1-5" %%a in ('now.exe') do echo %%a %%c %%b %%e
generates this output:
Mon 15 Nov 2004
 
Thanks Dave!!

helped a lot!

I exported the .reg from one 2000 box onto the other test machines. The
2000s work OK now. I still see a difference between 2000 and XP though:

Mon 15/11/2004,15:13:45.93,TESTLAPTOP2 (2000)
15/11/2004,15:15:57.48,SWOXPTEST (XP)

I actually do prefer the XP way, as Excel seems to like that better.
I've tried searching .DEFAULT for relevant items "DDD" and the like, but
no luck yet.

Adrian
 
Glad to hear it helps.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks Dave!!
|
| helped a lot!
|
| I exported the .reg from one 2000 box onto the other test machines. The
| 2000s work OK now. I still see a difference between 2000 and XP though:
|
| Mon 15/11/2004,15:13:45.93,TESTLAPTOP2 (2000)
| 15/11/2004,15:15:57.48,SWOXPTEST (XP)
|
| I actually do prefer the XP way, as Excel seems to like that better.
| I've tried searching .DEFAULT for relevant items "DDD" and the like, but
| no luck yet.
|
| Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top