Date Conversion question

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

Guest

Hi,

I am having a problem converting a timestamp to a date format. the field
looks like this

2006-06-07-13.36.10.781340

and im trying to get it to say 6/7/2006

Anyway I can do that?

Thanks!
 
If the datatype is DateTime then just use -- Format([YourField],"m/d/yyyy")
If it is a text field then you need --
Val(Right(Left([YourField],7),2)&"/"&
Val(Right(Left([YourField],10),2)&"/"& Val(Left([YourField],4))
 
Is there any reason why you can't look at the format properties of the
control and set it to short date? Anywhere this displays (table, form,
report) you can just set this property.
 
Tried that already, it deletes the field because it can't recognize it..its
in a txt format
 
Amazing...That would have taken me awhile to construct!

KARL DEWEY said:
If the datatype is DateTime then just use -- Format([YourField],"m/d/yyyy")
If it is a text field then you need --
Val(Right(Left([YourField],7),2)&"/"&
Val(Right(Left([YourField],10),2)&"/"& Val(Left([YourField],4))


Bob said:
Hi,

I am having a problem converting a timestamp to a date format. the field
looks like this

2006-06-07-13.36.10.781340

and im trying to get it to say 6/7/2006

Anyway I can do that?

Thanks!
 

Ask a Question

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.

Ask a Question

Similar Threads


Back
Top