|
-
Jan 27th, 2009, 12:35 PM
#8
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).
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|