Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: NT Script ?
Kevin,
As requested, and showing another way to get the date. If you don't want the seconds for the time you could use time /t.
Regards,
Bruce
C:\batch> test_time.bat
[08504789]
[0604Mon]
@echo off
rem test_time.bat
call :get_timestamp
call :get_datestamp
goto :EOF
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
:get_timestamp
:: get the time in format hhmmssxx, where 'xx' is hundredths of a second
:: because want ssxx can not use time/t for /f "tokens=1-8 delims=:. " %%a in ('echo.^| time ^| find "current"') do (
set zhh=%%e set zmm=%%f set zss=%%g set zxx=%%h
if 10 GTR %zhh% set zhh=0%zhh%
:: assign the values to ztimefull set ztimefull=%zhh%%zmm%%zss%%zxx%
echo [%ztimefull%]
rem cleanup
set zhh= set zmm= set zss= set zxx=
goto :EOF
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
:get_datestamp
:: get the time in format yyyymmdd for /f "tokens=1-8 delims=:.-/ " %%a in ('echo.^| date ^| find "current"') do (
set zyyyy=%%h set zmm=%%g set zdd=%%f
:: assign the values to zdatefull set zdatefull=%zyyyy%%zmm%%zdd%
echo [%zdatefull%]
rem cleanup
set zyyyy=
set zmm=
set zdd=
goto :EOF
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
-----Original Message-----
Sent: Wednesday, 27 June 2001 7:33
To: Multiple recipients of list ORACLE-L
Hi all,
Was wondering if anyone of the brains out there would know how to
add the
hour and minute to this beautiful little script that Tom Mercadante provided
me with? Not that Tom couldn't do it himself, he just didn't, I didn't ask
for it the first time that I requested such a script.
Thanks again Tom, this will help me out beautifully:)
rem ************************************************rem echo off
rem ************************************************
Sincerely,
Kevin Kostyszyn
DBA
Dulcian, Inc
www.dulcian.com
kevin_at_dulcian.com
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Reardon, Bruce (CALBBAY) INET: Bruce.Reardon_at_comalco.riotinto.com.au Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Jun 26 2001 - 17:22:38 CDT