Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to get next saturday 'Date' in DOS batch file  (Read 26859 times)

0 Members and 1 Guest are viewing this topic.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: how to get next saturday 'Date' in DOS batch file
« Reply #15 on: August 13, 2010, 10:58:02 PM »
Hey Salmon.
You are getting help from VBscript or windows script.

Is it fair?




Curious. This post and it's thinly veiled passive sentence form reinforce my suspicions.
I was trying to dereference Null Pointers before it was cool.

Salmon Trout

  • Guest
Re: how to get next saturday 'Date' in DOS batch file
« Reply #16 on: August 14, 2010, 12:52:06 AM »
Hey Salmon.
You are getting help from VBscript or windows script.

Is it fair?



Please restrict yourself to on-topic, useful posts.

Salmon Trout

  • Guest
Re: how to get next saturday 'Date' in DOS batch file
« Reply #17 on: August 14, 2010, 01:09:28 AM »

Curious. This post and it's thinly veiled passive sentence form reinforce my suspicions.

I have had the same suspicions myself. When the axe falls it should remove at least two heads.

ghostdog74



    Specialist

    Thanked: 27
    Re: how to get next saturday 'Date' in DOS batch file
    « Reply #18 on: August 14, 2010, 07:30:23 PM »
    Hey Salmon.
    You are getting help from VBscript or windows script.

    Is it fair?

    i don't know the details, but why is it not fair ? vbscript or other decent languages that knows how to calculate dates like that does the job. There is no prize for using only batch. Nobody is going to give you money using only batch. Are you greg/bill?

    victoria



      Beginner

      Thanked: 1
      Re: how to get next saturday \\\'Date\\\' in DOS batch file
      « Reply #19 on: August 14, 2010, 08:25:41 PM »
      Are youl?

      The people using more than one current login would  have the same
      IP address.  The Computerhope staff has access  to the IP addresses.

      Why the undue concern? 

      I have seen no damage by Vishuvishal.

      There appears to be an Inhouse Computerhope Bully Squad.

      Victoria and Vishuvishal  are not the same person.

      Only Victoria and Vishuvishal have been logged on at the same time.

      Their IP address for Victoria and Vishuvishal  indicates they are not the same person.




      Have a Nice Day

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: how to get next saturday 'Date' in DOS batch file
      « Reply #20 on: August 14, 2010, 08:26:34 PM »
      LOL, well, if we needed a post to confirm our suspicions, that would be it.
      I was trying to dereference Null Pointers before it was cool.

      victoria



        Beginner

        Thanked: 1
        How to get next saturday \'Date\' in DOS batch file
        « Reply #21 on: August 14, 2010, 08:32:49 PM »
        Well, if we needed a post to confirm our suspicions, that would be it.

        Say What?

        Are we Off Topic?
        Have a Nice Day

        Salmon Trout

        • Guest
        Re: how to get next saturday \\\'Date\\\' in DOS batch file
        « Reply #22 on: August 15, 2010, 01:12:09 AM »

        Only Victoria and Vishuvishal have been logged on at the same time.

        Their IP address for Victoria and Vishuvishal  indicates they are not the same person.


         :)

        vishuvishal



          Beginner
        • Thanked: 3
          Re: how to get next saturday 'Date' in DOS batch file
          « Reply #23 on: August 15, 2010, 06:41:43 PM »
          Thank you Victoria.
          Pure soul!
          Pure hear!
          Not flirting
          Truth is truth
          he he he...
           ;D ;D ;D ;D ;D ;D

          RoyBailey



            Rookie

            How to get next saturday Date in DOS batch file
            « Reply #24 on: August 16, 2010, 08:08:14 PM »


            set Pdate=%date:~10,4%%date:~4,2%%date:~7,2%


            C:test>type  sat.bat
            @echo off

            SET /a SatDate=%DATE:~7,2% +%1

            echo SatDate=%SatDate%

            Output:

            C:test>sat.bat 5
            SatDate=21

            C:test>



            ___________________________________


            C:test>type sat.bat
            @echo off

            SET /A SatDate=%DATE:~7,2% +%1

            echo SatDate=%SatDate%

            set Pdate=%date:~10,4%%date:~4,2%%SatDate%
            echo Pdate=%Pdate%
            C:test>

            Output:

            C:test>sat.bat  5
            SatDate=21
            Pdate=20100821

            C:test>
            « Last Edit: August 16, 2010, 08:36:11 PM by RoyBailey »
            USA

            Salmon Trout

            • Guest
            Re: how to get next saturday 'Date' in DOS batch file
            « Reply #25 on: August 16, 2010, 11:56:34 PM »
            So, "RoyBailey", will that script work anywhere in the world?

            http://i7.photobucket.com/albums/y268/billrich/aug.jpg

            RoyBailey



              Rookie

              How to get next saturday Date in DOS batch file
              « Reply #26 on: August 17, 2010, 09:34:48 AM »
              So, RoyBailey, will that script work anywhere in the world?

              aug.jpg


              ST,


              My solution for finding next Saturday is with batch.  ST does not use batch.

              The Original Poster will decide which method works best for his use.

              The readers will make the same choice

              My solution will work anywhere in the world with slight and easy modification.

              One line of code instead of several lines.
              USA

              Salmon Trout

              • Guest
              Re: How to get next saturday Date in DOS batch file
              « Reply #27 on: August 17, 2010, 10:32:10 AM »
              My solution for finding next Saturday is with batch.

              But it doesn't find the following Saturday, unless you tell it how many days there are until next Saturday! (Is this guy for real?)

              Quote
              ST does not use batch.

              THis is false as well.

              RoyBailey is actually Billrich, the banned troll. Banned for repeatedly posting misleading, wrong and false "solutions" and abusing forum members. And for evading the ban by rejoining using a proxy server.

              RoyBailey



                Rookie

                How to get next saturday Date in DOS batch file
                « Reply #28 on: August 17, 2010, 11:40:25 AM »
                But it doesnt find the following Saturday, unless you tell it how many days there are until next Saturday.



                ST,

                Your Staturday solution is great.

                The Original Poster and the readers will decide what works best for them.


                It is good the Original Poster and the readers have a choice.

                Have a good day and thanks for the kind words.
                USA

                Salmon Trout

                • Guest
                Re: how to get next saturday 'Date' in DOS batch file
                « Reply #29 on: August 17, 2010, 12:32:48 PM »
                RoyBailey, you are one of the most unpleasantly stupid imbeciles it has ever been my misfortune to encounter. I see you shirk any discussion of your "code". The OP has a "choice" between: code that works and your lunatic nonsense, which you posted a long while after this very touching message:


                Quote
                Thanks a lot  Salmon!!!
                You ROCK!!!!!! Ban-cha
                Issue resolved.

                I fear that ComputerHope's effectiveness will be gravely compromised until some method of permanently banning Billrich is found.


                « Last Edit: August 17, 2010, 12:46:37 PM by Salmon Trout »