Date in Win 2K server

G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

Hi ,

What the date that is displayed on the command prompt is not the same when I
set it in the Control panel = > Input Locales..

If I change the date on the control panel => input locales to dd/mm/yyyy
(portuguese Brazilian), it shows correct, but in a few minutes in a command
prompt the date returns to mm/dd/yyyy (US format) when i type date command.

Can anyone help me cause I have an application that gets the system date,
but the date must be in a dd/mm/yyyy format.

Thank's

Junio
 

Royce

Distinguished
Jul 3, 2004
64
0
18,630
Archived from groups: microsoft.public.win2000.general (More info?)

Here is a batch file that sets %%a to the month, %%b to the day, and %%c to
the year. Hope this helps...

@echo off
setlocal
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set xdate=%%b-%%a-%%c
echo.
echo Date = %xdate%
endlocal
pause >nul



"Junio" wrote:

> Hi ,
>
> What the date that is displayed on the command prompt is not the same when I
> set it in the Control panel = > Input Locales..
>
> If I change the date on the control panel => input locales to dd/mm/yyyy
> (portuguese Brazilian), it shows correct, but in a few minutes in a command
> prompt the date returns to mm/dd/yyyy (US format) when i type date command.
>
> Can anyone help me cause I have an application that gets the system date,
> but the date must be in a dd/mm/yyyy format.
>
> Thank's
>
> Junio