S
Sirocco
Anyone know a way to convert a date field to text? For example, I want to
convert 11/22/04 to text.
Thanks in advance.
convert 11/22/04 to text.
Thanks in advance.
Sirocco said:Anyone know a way to convert a date field to text? For example, I want
to
convert 11/22/04 to text.
Sirocco said:Anyone know a way to convert a date field to text? For example, I want to
convert 11/22/04 to text.
Sirocco said:Actually, CStr wouldn't work as intended either. I'm trying to compare
12/2/04 to 12/2/04 10:00:00 AM, from 2 different date fields, but which
can't be compared as is (can't compare short date with long date).
Solution: first, I used the format function to convert the long date to
the
short date, but that also turns it into a text field (as evidenced by the
type mismatch error), so I put all the values into a temp table, then
queried that, but used the CStr function to convert the remaining date to
text, so I ended up comparing text to text, and got the results I wanted.
I suppose the question remains is this the best way to compare a short
date
with a long date?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.