Removing quotation marks ....

lucour

Registered User.
Local time
Today, 11:47
Joined
Mar 7, 2001
Messages
60
Hi,

This is probably real easy to do, but ........ I have a field in Access that looks like this:

"12:12:01 PM 12/5/2005, 5:00:01 AM 12/6/2005, 7:00:25 AM 12/6/2005"

From this string, all I want is the last Date entry (mm/dd/yyyy). Thus in this result, it would be 12/6/2005. I know how to use the Right(), Left() and Mid() functions, but I do not want quotation marks included in my result.

Any help would be great ......
 
Use the len function to find out how long your field is.
Then use the mid function

ie for example above you would need:
mid([field1],(len([field1]-10),9)
assuming field is called [field1]
 
I tried this. I was prompted to add another closing parentheses, which I did. But then when I ran it, it said: "Syntax error (comma) in Query expression ...." So then I tried removing the opening " ( " before Len, and the results were just filled with #Error.
 
Code:
TrimIt: Replace(LTrim(Right([Field1],11)),'"',"")

That should work, even if you have 12/12/2005. Let me know if not.
 
reclusivemonkey,

Your solution did it. This worked perfectly. Thank you very much.
 

Users who are viewing this thread

Back
Top Bottom