How can you set Dos date as YYYYMMDD in After Action script?

Hellos...
I have been trying the standard method to get the DOS date as a format string YYYYMMDD
It seems to cause the AfterAction script to bomb.
I am trying this script ...
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<ResourceAction name='ISSHP-enable-email'>
<ResTypeAction restype='Windows Active Directory' timeout='60000'>
<act>
rem Action for MSE2007 test/development to Enable-Mailbox a new AD User created by IDM.
rem Set up environment as necessary (copy of idmadm account's environment)
rem Local script environment settings
     SET LogFileDrive=C
SET LogFileDir=%LogFileDrive%:\Sun\ADAfterActionsLog\
SET DBtoUse=idmex.sks.local\Mailbox Database
rem set TODAYDATE as yyyyddmm and TIMENOW as hhmmssdd to be used in the Log file name
     set TIMENOW=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
     for /F "tokens=2-4 delims=. " %i in ('date /t') do set TODAYDATE=%k%j%i
set >> %LogFileDir%AfterActionLog.txt
rem PS Commands from here...
exit
</act>
</ResTypeAction>
</ResourceAction>
</Waveset>
But the line
for /F "tokens=2-4 delims=. " %i in ('date /T') do set TODAYDATE=%k%j%i
is causing problems..
How have others managed to turn date /T into YYYYMMDD within an after action ??
I know in our Gateway date /T will output (today): pe 29.01.2010
GF

The output from the for command when run in the cmd shell is as expected.
I have tried both batch and command line variable settings in my action script i.e.
for /F "tokens=2,3,4 delims=. " %i in ('date /T') do echo %k%j%i
and
for /F "tokens=2,3,4 delims=. " %%i in ('date /T') do echo %%k%%j%%i
with no joy. I suspect that its the Gateway launched shell executor that is having problems with the for do command.
Anyways, using
set todaysdate=%date:~9,4%%date:~6,2%%date:~3,2%
solves my problem. Just curious why the for construct bombs in the resource action.
Thanks. GF

Similar Messages

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • How can i set the date time year to my i pod

    how can i set the date time year to my i pod touch

    Hello Theodora,
    You can do this via your iPod's Settings application.
    B-rock

  • How can you set up more than one device on iTunes. I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices.

    How can you set up more than one device on iTunes? I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices. I have all my music/videos on iTunes on my mac book pro. Can you set up separate folders for each device and drop in what ever music/videos from the main iTunes library?

    In itunes it is called syncing and you can choose exactly what content to sync to all devices and it can be different for all of them
    How to sync

  • How can you set the max row for a 'open cursor' in a stored proc?

    I would like to know how can you set the maximum amount of row returned in a resultset coming from a stored proc?
    You can do it via JDBC with cStatement.setMaxRows(10); but it works only for select that you do via JDBC...
    I would like the same functionality using open cursor inside a stored proc...
    Thanks...

    is "where ROWNUM <= 10" the equivalent of "cStatement.setMaxRows(10);" because the ROWNUM as problem with the ORDER BY clause and the setMaxRows() as no problem...

  • How can I set document date automatically as system date?

    I use FBV1, FBV2, F-02, FB02. Posting date is automatically set as system date. I want to set document date automatically as system date.
    How can I set document date automaticall as system date?
    Wbr.
    İlker Çokkeçeci
    Computer Engineer
    Ankara, Turkey

    Hi Expert,
    Please refer the below link..
    Document date to be defaulted as system date for all FI transactions
    as there mentioned, please go to T-Code: SHD0.
    Regards,
    GK
    SAP

  • How can you set a ringtone for unknown numbers

    How can you set a ringtone for unknown numbers?

    You can set up each one of your contacts with a ringtone and use the default for all other unknown numbers. There is no way to set up a ringtone for unknown numbers.

  • HT1373 how can you set up another iTunes account but keep all your purchases and music from a previous account

    how can you set up another iTunes account but keep all your purchases and music from a previous account

    An iTunes account is something you log into online to buy music.
    An iTunes library is a collection of media and other items (including apps) on your computer.  This is what you see when you open iTunes.
    So, do you mean account or library?  You can set up a new iTunes account but all your purchases made in that account will remain in the old account and cannot be moved.  You can set up a new library by starting iTunes and immediately hold down the option key.

  • How can I set my phone to delete messages after a certain period of time? 6 months, 1 year??? It is taking up over 4GB on my phone.  I don't want to delete everything just the oldest ones.

    How can I set my phone to delete messages after a certain period of time? 6 months, 1 year??? It is taking up over 4GB on my phone.  I don't want to delete everything just the oldest ones.

    If you update to iOS 8, you can select that in Settings>Messages>Keep Message and then select your option. If you don't update to iOS 8, you'll need to do it manually.

  • How can you see a date on a picture

    When you take pictures how can you go back to see what date you took them

    Not in the Photo app.  You can after you import the photo to your computer.  I have not checked to see if there are any apps allow you to view the date. Photoshop Express does not.

  • How can you set Thunderbird to accept multiple attachments, particularly when selecting "email" in Windows Gallery with T'bird selected as default email

    Using Windows Gallery to send email photos - wioth each selection T'Bird opens a new email form. How can I set T'Bird to accept multiple attachments (similar to Gmail ).
    Using W'Gallery has the benefit of rteducing size of emailed pic to a few hundre kb.
    Thanks

    You best ask the windows gallery people. Thunderbird opening more than one window is based on yhow the request is made, not on Thunderbird,
    Selecting multiple files in explorer simply adds them to a mail, therefore the Windows gallery is the problem.

  • How can you copy form data from an online PDF, in your browser?

    Just a quick query, I've recently filled out an online application and I filled this out on an online PDF form. This is the form link:
    http://3fivetwo.com/dloads/application_pack_-_admin_long10.pdf
    How can I copy the data I typed into this form, to a word document for example? Or is there any way I can save this as a PDF with all the data in the form, to send it as an email?
    I've downloaded the form, but it just shows blank pages with no fields filled.
    Thanks very much!

    download the form to your local disk
    open it with Adobe Reader and fill in all the details
    save it
    send the completed form by email

  • How can you set the ctxsvr time interval ?

    I would like to know how can i set the time
    inteval between each update of the Intermadia
    indexes.
    Thanks.

    stop and restart ctxsrv on specified intervals.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Lombar vincent ([email protected]):
    I'd like to use the ctxsrv utility, because i want automatic index rebuild.
    But Is it possible to set the time interval
    between each update?<HR></BLOCKQUOTE>
    null

  • Using numbers, how can you set percentage to show decimals?

    When using numbers, how do you set the format to allow for decimals in a quotient formula with the cell formatted for percentages?

    It would be 'View' > 'Sidebar' > 'Bookmarks'. Shortcut 'Ctrl' + 'B' on the keyboard.
    If the 'View' menu is not visible please try pressing 'Alt' + 'V'.

  • How can I set a specific start play time after disc insertion?

    How can I set an automatic play start time of (say, a minute after the DVD was inserted) if the watcher has not selected anything from the main menu?
    TIA.
    MacBook Pro 2.16 ghz 17   Mac OS X (10.4.9)   FCP 5.1.2 DVDSP 4.1.1

    Set the timeout action for the menu in inspector
    (General Tab for the menu, set the seconds and what
    it should do there)
    I set the At End menu to Timeout, set the seconds to the same as the time for the song playing in the background to finish, and set the Action to go to the Track where the video is. The song ends but it just remains on the Main menu. The video doesn't start.
    What have I missed?
    Again, TIA.
    MacBook Pro 2.16 ghz 17   Mac OS X (10.4.9)   FCP 5.1.2 DVDSP 4.1.1

Maybe you are looking for