cdate problem

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

hellp ladies and gentlemen

i have a form that pulled select data from a access db. the form load info
into a variety of textboxs. Three of the fields are date. The form shows
everythign correctly. When i preform a sql update , the date fields go to a
long date format with is not what i need. Im using the following

dim example as date = cdate(textbox1)

"update example_file set datefield = example"

when i look at the record it has written to file the long date..so.........
the question is...does cdate have a short date property or is my approach
just plain wrong
 
In a long way, what I do is this:

textbox1.text = textbox1.text.toshortdatestring

Hope this helps.

Brad
 
brad

I found the following in a mind numbing search for the answer

sqlStatement = "update examlpe_file set datefield = # " &
Format(dateVariable,"Short Date") & " #"

seems to do the trick....

i havent a clue why update is handled different in a sql statemnt in vb.net
but what the hell

Thanks for the response
 

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