Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: NT Script ?

RE: NT Script ?

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 27 Jun 2001 10:00:31 -0700
Message-ID: <F001.0033A27D.20010627083234@fatcity.com>

Kevin,

did you see Bruce's script he sent on Tuesday? It does exactly what you want (and what I didn't know how to do!).

It is included below - thanks Bruce - I tried it and it works like a charm. Who says we need Perl (Jared????) :)

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
[mailto:Bruce.Reardon_at_comalco.riotinto.com.au] Sent: Tuesday, June 26, 2001 7:31 PM
To: Multiple recipients of list ORACLE-L

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
IF NOT '%1'=='' GOTO SetEnvVars
for /F "delims=/ tokens=1-4" %%i in ('date /t') do today.BAT %%i %%j %%k %%l
GOTO Done
:SetEnvVars
:: set DayOfWeek=%1

set Month=%2
set Day=%3
set Year=%4
:Done
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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us

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 Wed Jun 27 2001 - 12:00:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US