parse as a string remove the double quotes too

"Generated","04-25-2010","at","08:40:13pm"

In MS Access 2003.... Visual Basic 6.
I need to extract the value 04-25-2010 in str1
I need to extract the value 08:40:13pm in str2

Now I need to combine both and compare to a field last_update from  a table called cntrl
if the value is different, I need to update the table with this value.
EmadGirgisAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EmadGirgisAuthor Commented:
last_update field type is data/time
0
Sarika30Commented:
try using the split function
0
EmadGirgisAuthor Commented:
example
??
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

GrahamSkanRetiredCommented:
This will extract the strings and remove the quotes.
0
GrahamSkanRetiredCommented:
Oops. It works better if I remember to post the code.
    Dim str1 As String
    Dim str2 As String
    Dim strParts() As String
    Const MyString = """Generated"",""04-25-2010"",""at"",""08:40:13pm"""
    
    strParts = Split(MyString, ",")
    str1 = Replace(strParts(1), """", "")
    str2 = Replace(strParts(3), """", "")

Open in new window

0
EmadGirgisAuthor Commented:
Cool

I have a question...
How I combine sr1 and str2 and use it against date/time field in my database
is there a To_DATE function or something like oracle
0
Sarika30Commented:
you can try to convert your date field to text and then compare.

MYSTRING=FORMAT(last_update ,"yyyymmdd")
0
GrahamSkanRetiredCommented:
It is best to compare dates directly. You can convert the strings to a date type by using CDate.


dim MyDate as Date

MyDate = Cdate(str1 & " " & str2)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EmadGirgisAuthor Commented:
GrahamSkan,

There is a table I populate from a csv file. Some field get empty.

How to represent the empty in a where clause.

PSEUDO CODE

WHERE XYZField is empty
0
GrahamSkanRetiredCommented:
That seems to be a completely different question, but try this

SELECT * FROM MyTable WHERE XYZField Is Null;
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.