I wish to edit the contents of a string so I can use it for comparison. The string is the creation date of a file and its format is "dd/mm/yyyy hh:mm:ss xm" how can I remove the time from the string as the date is the only thing I am interested in ????
That's a good question.
I'd really like to know how to do a substring in VBscript (if you can)...
I had something similar and I ended up using a loop to search through the string for all instances of ~ as I was using this to break the file up. And then i used to Split function.
I'd suggest you could do the Split function and then just search the array(0) for your date.... Split based on a space (" ".
eg DateArray = Split(strDateTime, " ", -1, 1)
This would break it up by dates and the first array element is your date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.