SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4

Thread: Date increment

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Date increment

    Is there any way to make a variable that is a date increment by one at a time

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Date increment

    Yes, but it may not be easy. I wrote a function to compare two dates based on the sytem date pluss or minus any number of days (it came in handy where the start or end date for a report was supposed to default to x number of days from Today).

    I am not sure if Silktest has a newer method that makes this easier (I wrote this for Silktest 2.1.4) but if not just modify my code to get rid of the comparison and feed it the integer to increment from a loop in the testcase.

    Good Luck.

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Location
    Rosemont, IL USA
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Date increment

    ...just look up the AddDateTime() function and see that you can iterate the "iDays" parameter(an integer) so you simply use a for loop
    john yu

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Date increment

    Yes AddDateTime does do this to a DateTime type variable, but the problem is usually that you nned to get that into a text field or compare it to a displayed date which is a STRING. The code I provide mainly is designed for comparisons, but it also contains the typcasing which can be confusing for some (it sure was for me a non-programer).

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:03 PM.

Copyright BetaSoft Inc.