SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Aug 2001
    Location
    Itasca, IL
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to write current time + 15 min ahead of time ?

    Hi Guys!
    I'm trying to write in the Textfield the current time + 15 minutes. Basically 15 minutes ahead of current time. What I have can write the current time only which is: -
    [ ] STRING sTime
    [ ] sTime = TimeStr ()
    [ ] myApp.textField1.SetText (sTime)


    Any suggestions?



    [This message has been edited by rhafeez (edited 05-02-2002).]

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    Look up AddDateTime in SilkTest help

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Member
    Join Date
    Aug 2001
    Location
    Itasca, IL
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    well the addDateTime func returns DataTime data where as the setText is expecting a string......

    Any one else has any other solution

    ------------------

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    Type casting from DATETIME to STRING is easy in SilkTest. The STRING that results is formatted according to a universal ISO programming standard, so we should not need to worry about it changing in future SilkTest releases ;-)

    This code shows what you want to do:
    So how do you like Lombard ?

    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    For the lazy bum:
    Add # of minutes to time.

    newDT = AddDateTime (Datetime [, iDays, iHours, iMins, iSecs, iMsecs ] )

    [This message has been edited by GodKnows (edited 05-02-2002).]

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    rhafeez, Whoops I guess you took GodKnows totally wrong he infact suggested a very effective and efficient solution.


    ------------------

  7. #7
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    Lol; another guy who can't read the help, for a simple problem. If there are more ppl like you we would reach record postings.

    Also Did I not post a solution for your problem? Read the help before posting whatever. This has nothing to do with skills, but the problem solving methods.

    TonyM already gave you a pointer about AddDateTime() and you should seek further for your own benefit.



    ------------------

  8. #8
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?



    [This message has been edited by awhiteleather (edited 05-02-2002).]
    Atlee

  9. #9
    Member
    Join Date
    Aug 2001
    Location
    Itasca, IL
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to write current time + 15 min ahead of time ?

    Thanks a lot RobKapteyn!

    It works fine. I was just having problem converting the date to string but you are great.
    And yah Rob I love Lombard, also work in Lombard too. Do you live in the area too?

    -----------------------------------------
    And Mr GodKnows!
    I would advise you to read the content first before you comment someone. This is an open forum and no body should be calling any body NAMES (I don't appreciate that). PPL come here to seek knowledge from all different skill sets.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:49 AM.

Copyright BetaSoft Inc.