SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Guest

    function to manipulate date

    Does anyone has function to manipulate date
    to get yesterday's, tomorrow's date?

    SilkTest does not have built-in function
    to +/- 1 to get it.

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: function to manipulate date

    If you convert your Date variable to a DateTime, then you can use AddDateTime to add or subtract days, months, years etc.; then you can convert it back to a Date variable.

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

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: function to manipulate date

    Here's a function I wrote a while ago. It takes the type of interval, positive or negative interval, and a date as arguments. You can add or subtract days, weeks, months, quarters, or years.

    Sorry, I haven't got around to commenting this particular function yet but if you're somewhat up to speed with coding it shouldn't be too hard to follow (I hope).

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

  4. #4
    Member
    Join Date
    May 2003
    Location
    DC
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: function to manipulate date

    Hi Steve,
    Where can I find the function which you have written. I need a function to subtract days, months, etc. from a given date. I hope your function will be helpful.

    Thanks
    Kiran

 

 

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 12:53 AM.

Copyright BetaSoft Inc.