Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: DOS question
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
set HH=3D%%s set MI=3D%%t set SS=3D%%u
Alex.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Reardon, Bruce
(CALBBAY)
Sent: Wednesday, December 01, 2004 1:04 PM
To: SinardyXing_at_bkgcomsvc.com; Oracle-L_at_freelists.org
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_at_freelists.org]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>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-lReceived on Wed Dec 01 2004 - 16:44:50 CST
![]() |
![]() |