
|
RE: DOS question
- From: <Alexander.Feinstein@xxxxxxxxxxxxx>
- To: <Bruce.Reardon@xxxxxxxxxxxxxxxxxxxxxxx>, <SinardyXing@xxxxxxxxxxxxx>, <Oracle-L@xxxxxxxxxxxxx>
- Date: Wed, 1 Dec 2004 14:47:55 -0800
Here is another alternate that works:
for /F "tokens=3D1-4 delims=3D/ " %%o in ("%DATE%") do (
set MM=3D%%p
set DD=3D%%q
set YY=3D%%r
)
for /F "tokens=3D1-5 delims=3D.:" %%s in ("%TIME%") do (
set HH=3D%%s
set MI=3D%%t
set SS=3D%%u
)
set CURR_DATE=3D%YY%%MM%%DD%%HH%%MI%%SS%
set CURR_DATE=3D%CURR_DATE: =3D0%
Alex.
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Reardon, Bruce
(CALBBAY)
Sent: Wednesday, December 01, 2004 1:04 PM
To: SinardyXing@xxxxxxxxxxxxx; Oracle-L@xxxxxxxxxxxxx
Subject: RE: DOS question
Here is an alternate CMD / batch approach that works:
:: get the time in format hhmmssxx, where 'xx' is hundredths of
a =3D
second
:: because want ssxx can not use time/t
for /f "tokens=3D3D1-8 delims=3D3D:. " %%a in ('echo.^| time ^| find =3D
"current"') do (
set zhh=3D3D%%e
set zmm=3D3D%%f
set zss=3D3D%%g
set zxx=3D3D%%h
)
if 10 GTR %zhh% set zhh=3D3D0%zhh%
:: assign the values to ztimefull
set ztimefull=3D3D%zdate%%zhh%%zmm%%zss%%zxx%
Something similar to the if could be used for your case
That is, put hours into intermediate variable, check if less than 10, if
=3D
it is, prepend zero to the right most character.
HTH,
Bruce Reardon
-----Original Message-----
From: [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Sinardy Xing
Sent: Thursday, 2 December 2004 4:41 AM
I discover a bug in my script
time tag from "hhmmss" become " hmmss"
---------------------------
C:\Documents and Settings\sinardy>time
The current time is: 1:37:01.50
Enter the new time:
C:\Documents and Settings\sinardy>echo %time:~0,2%%time:~3,2%%time:~6,2%
13710
C:\Documents and Settings\sinardy>
---------------------------
my imp always fail from 12 am - 9:59 am
imp ...... log=3D3Dmylog 13710.log <--------- imp fail
anyone have solution?
Sinardy
NOTICE
This e-mail and any attachments are private and confidential and may =3D
contain privileged information. If you are not an authorised recipient,
=3D
the copying or distribution of this e-mail and any attachments is =3D
prohibited and you must not read, print or act in reliance on this =3D
e-mail or attachments.
This notice should not be removed.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Other related posts:DOS question Re: DOS question RE: DOS question RE: DOS question RE: DOS question RE: DOS question Re: DOS question
|

|

|
[ Home |
Signup |
Help |
Login |
Archives |
Lists
]
All trademarks and copyrights within the FreeLists archives are owned
by their respective owners. Everything else ©2008 Avenir Technologies, LLC.
|

|
|