Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. problem in retrieving "Time" from database using _RecordsetPtr

problem in retrieving "Time" from database using _RecordsetPtr

Scheduled Pinned Locked Moved Database
databasemysqlcomhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PrafullaVedante
    wrote on last edited by
    #1

    Here i am developing a application which require to fetch Time from database . But i am getting 00:00:00 AM as a time everytime. We are using MySql database. Code fragment is.... ======================================================== _variant_t vtValue; vtValue = RsSession->Fields->GetItem("StartTime")->GetValue(); COleDateTime d( vtValue ); sprintf( name, "%02d:%02d:%02d",d.GetHour(),d.GetMinute(),d.GetSecond() ); ======================================================== in "name" i am getting "00:00:00" ..everytime.. All the other values i am retrieving from ResultSetPtr are OK. Can any one tell me what is to be done ther .... Thanks in advance

    Prafulla Vedante e-mail : prafulla_v@asianitg.com

    R 1 Reply Last reply
    0
    • P PrafullaVedante

      Here i am developing a application which require to fetch Time from database . But i am getting 00:00:00 AM as a time everytime. We are using MySql database. Code fragment is.... ======================================================== _variant_t vtValue; vtValue = RsSession->Fields->GetItem("StartTime")->GetValue(); COleDateTime d( vtValue ); sprintf( name, "%02d:%02d:%02d",d.GetHour(),d.GetMinute(),d.GetSecond() ); ======================================================== in "name" i am getting "00:00:00" ..everytime.. All the other values i am retrieving from ResultSetPtr are OK. Can any one tell me what is to be done ther .... Thanks in advance

      Prafulla Vedante e-mail : prafulla_v@asianitg.com

      R Offline
      R Offline
      Rob Graham
      wrote on last edited by
      #2

      What is the data type of the field "StartTime"?

      P 1 Reply Last reply
      0
      • R Rob Graham

        What is the data type of the field "StartTime"?

        P Offline
        P Offline
        PrafullaVedante
        wrote on last edited by
        #3

        Data type of the field "StartTime" is "time"

        Prafulla Vedante

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups