Formatting a Date for Access/ADO

Results 1 to 2 of 2

Thread: Formatting a Date for Access/ADO

  1. #1
    Andrew Spencer Guest

    Default Formatting a Date for Access/ADO

    I am having a real problem getting my &#060;FORM&#062; drop down submissions converted into a date that my Access DB will take via ADO<BR><BR>I have the month (01, 02, 03, et) the year (2000, 1999, etc) and the day (1...., 31) but I can&#039t seem to get them in a string or date variant that will write to the DB - I get all the other info and no error message, but the date field is just blank - any help wouldbe great . I have tried casting it as a date and many string maniplulations - <BR><BR>Thanks in Advance

  2. #2
    Leungas Guest

    Default RE: Formatting a Date for Access/ADO

    It really depends on how your SQL query is written, but what you may do is<BR><BR>dim datestring &#039This is the string<BR>dim datevar &#039This is the variable that plug to DB<BR><BR>datestring = Month & "/" & Day & "/" & year<BR>datevar = cdate(datestring)<BR><BR>&#039Then do whatever you need to do what the field<BR><BR>This may help you out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts