ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss - IBM AS400

This is a discussion on ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss - IBM AS400 ; I'm helping a customer, and I'm a bit rusty. They have V4R5 (!!). I need to put the current timestamp into a string in the format YYYY- MM-DD-hh.mm.ss Any ideas? Thanks, -- Don Schenck, York, PA...

+ Reply to Thread
Results 1 to 6 of 6

Thread: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

  1. ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

    I'm helping a customer, and I'm a bit rusty.

    They have V4R5 (!!).

    I need to put the current timestamp into a string in the format YYYY-
    MM-DD-hh.mm.ss

    Any ideas?

    Thanks,

    -- Don Schenck, York, PA


  2. Re: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

    Have a look at the QWCCVTDT API. Inserting the -s and .s should be
    straightforward.
    Or you could use the CURTIME and CURDATE functions in SQL.


  3. Re: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

    "DonSchenck" ha scritto nel messaggio
    news:1193407416.064432.28810@o3g2000hsb.googlegrou ps.com...
    > I'm helping a customer, and I'm a bit rusty.
    >
    > They have V4R5 (!!).
    >
    > I need to put the current timestamp into a string in the format YYYY-
    > MM-DD-hh.mm.ss



    value = %char( %date( %timestamp() ):*iso)+'-'%char(
    %time(%timestamp():*hms);

    HTH

    --
    Massimiliano

    ----------------------------------------
    La prova più forte contro una teoria, è la sua applicabilità pratica.

    http://www.toninelli.it



  4. Re: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

    Sorry! V4R5 and not V5R4!!

    --
    Massimiliano



  5. Re: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss

    On Oct 26, 10:30 am, "walker.l2" wrote:
    > Have a look at the QWCCVTDT API. Inserting the -s and .s should be
    > straightforward.
    > Or you could use the CURTIME and CURDATE functions in SQL.




    THANK YOU kind sir.

    I used the QWCCVTDT API and %subst to get my answer!

    -- Don Schenck, York, PA


  6. Re: ILE RPG, V4R5, YYYY-MM-DD.hh.mm.ss


    "DonSchenck" a écrit dans le message de news:
    1193407416.064432.28810@o3g2000hsb.googlegroups.co m...
    > I'm helping a customer, and I'm a bit rusty.
    >
    > They have V4R5 (!!).
    >
    > I need to put the current timestamp into a string in the format YYYY-
    > MM-DD-hh.mm.ss
    >
    > Any ideas?
    >
    > Thanks,
    >
    > -- Don Schenck, York, PA
    >


    Something like that :
    ..
    D TIMSTP S Z
    D MyString S 19A
    ..
    ..
    C TIME TIMSTP
    C *ISO MOVEL TIMSTP MYSTRING

    best regards

    FF (highvalue.fr)



+ Reply to Thread