|
-
Mar 21st, 2003, 01:17 AM
#1
Thread Starter
Fanatic Member
String Manipulation
Hi Everyone,
I currently have a string file name that is similar to the following:
StringName 20 May 02.pdf
How can I retrieve the month and year from the following string? StringName will vary in length depending upon what the user named the file, however, the latter part day, month, year .pdf will remain the same length all of the time. Thanks for any help.
-
Mar 21st, 2003, 01:36 AM
#2
Try this:
VB Code:
date =left(right(FileName , 13),9)
-
Mar 21st, 2003, 02:09 AM
#3
Thread Starter
Fanatic Member
Thanks for your help Lightning. The code works just fine but is not quite what I was looking for. I am trying to find just the Month and Year from the string so that I can format them from a short date format to a long date format. For example, In the following string I want retrieve the month and year from the string and convert it into a long month and year. Make sense?
examples: Mar 02 Should equal March 2002
Dec 03 Should equal December 2003
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
|