Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Question Unanswered: Retrieving Dates from Access Database using ODBC

    I'm using ODBC programming to connect to MS Access Database in VC++ 6.0
    Using the code below i'm unable to get the Date correctly from the database which is stored correctly

    sr = SQLBindCol(hstmt,2,SQL_C_TYPE_DATE,
    if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)
    displayError(sr, "Error in Bind 2");
    Here reldate is CTime reldate[10]
    after this
    CString s = don.reldate->Format("%d-%m-%Y");
    s doesn't show the desired value

    Thanks in advance for all the help.

  2. #2
    Join Date
    Jun 2002
    Try Format("%m-%d-%Y")

  3. #3
    Join Date
    Mar 2004

    Angry Ain't no help

    Originally posted by orna
    Try Format("%m-%d-%Y")
    That ain't of any help...Format just changes the viewed format not the retrieved..
    Thanks anyway

Posting Permissions

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