Date format - code to alter?

D

Dickie Black

Hi,

I've got an unbound combo box which produces a date in the format "dddd d mm
yyyy" eg Monday 4 November 2002.

I would like to use this value in a query, but i think the two sets of "d"
values are screwing things up.

I have tried using the expression "Format([DateBox], "dd-mm-yyyy") but this
does nothing.

I have also tried DateValue([DateBox]), but this gives me a type mismatch
error.

What code could I use to chop off the preceeding day value? (and leave, for
example 4 November 2002)

Thanks,

Dickie
 
D

Dickie Black

S'ok, I've figured it out myself:

DateVal = Right(Me.DateBox, Len(Me.DateBox) - 7)
 

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

Top