Results 1 to 11 of 11

Thread: vb6 - Delete folder with yesterdays date

Hybrid View

  1. #1
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: vb6 - Delete folder with yesterdays date

    CDate(CLng(Date)) does more work than it needs to - just using Date by itself will give the same results (but if you use Now rather than Date, you would need that extra work to remove the time portion).

    Quote Originally Posted by abhijit
    I tried a test. I changed the regional settings on my computer and set the date to 11-Jan-2009.
    If I use a Format(Date$,"mm-dd-yyyy"), it screws up the output.
    If I use Format$(Now,"mm-dd-yyyy"), the regional settings do not seem to affect the output.
    That is to be expected.
    Aren't both Now() and Date$ returning variants?
    As the FAQ article explains, no.

    Now and Date (without a $) return Variant with a sub-type of Date, which is essentially the same thing as a Date.

    Date$ (with a $) returns a String.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2008
    Posts
    170

    Re: vb6 - Delete folder with yesterdays date

    Thanx to all!!!

    Based on your suggestions i am trying to test and figure out the best possible solution for my code. Will update u guyz shortly...

Posting Permissions

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



Click Here to Expand Forum to Full Width