Problemas with function Format()

D

dmplacebo

Hi!!!

Thanks for your information but... I've got a doubt about the thing
you've told me.

The macro that I'm using receives the param "Dia" in DATE format bu
I'm not sure if this is the best option or if I should change to strin
format.

My date base accepts the following format: (I was testing this in othe
software)

TO_DATE('29/06/2005 22:59:00','DD/MM/YYYY HH24:MI:SS')

where Dia=29/06/2005 22:59:00

The problem is that I can't use the function TO_DATE in the VBA code
that means I must use the function Format() or not????.

How can I include my param "Dia" in the appropiate format???.

Thank you, thank you and thank you again.

David.


T_BLOC_ARRET.C_BA__DATE_DE_DEB=ADUT >""" & Format(Dia,"mm-dd-yy") & ""


Note the changed string part:

""" &
Format(Dia,"mm/dd/yy") & """

The date should be enclosed in quotes, but since youre inside a string
you need to double them. Also you need to convert the date to a string
again for the SQL, so you need to know which string format is accepted
by the SQL source (I assume american date format
 

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