Trim after space

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my query I need to trim after first space.
For example:

11/11/2007 10:00:00 AM

I need to show only date

11/11/2007.

Please help.
Thanks.
 
Is the field that contains the date/time info a DateTime data type field? Or
is it a text field?

How did you try to use the DateValue example? Post the SQL statement that
you tried.
 
I found the solution.
What i was looking for is for this formula:

Trim(Left([FieldName], Instr(1,[FieldName] & " "," ")))

Works perfect.

Thanks.
 
JT -

This is not going to work out anything near perfect in the long-run. You're
using a text format rather than date/time data type, thus deprieving yourself
of all of the date/time functions available in VBA. Suggest you read-up on
the date/time data type and correct it now. It'll save a whole lot of
headaches in the future.

Bob
I found the solution.
What i was looking for is for this formula:

Trim(Left([FieldName], Instr(1,[FieldName] & " "," ")))

Works perfect.

Thanks.
Is the field that contains the date/time info a DateTime data type field? Or
is it a text field?
[quoted text clipped - 22 lines]
 
Back
Top