formating date and time
-
Hi i have the following bit of code which i use to pull the 'date_in' field from my database, using ado variant v_Time_Issued vTime_Issued = cpSet->GetCollect(L"date_in"); date_in has the value 2003-04-22 10:19:18.000 i need to be able to format the vTime_Issued so that im just left with the time so all i want from date_in is 10:19 any ideas ????? Si
-
Hi i have the following bit of code which i use to pull the 'date_in' field from my database, using ado variant v_Time_Issued vTime_Issued = cpSet->GetCollect(L"date_in"); date_in has the value 2003-04-22 10:19:18.000 i need to be able to format the vTime_Issued so that im just left with the time so all i want from date_in is 10:19 any ideas ????? Si
-
Hi i have the following bit of code which i use to pull the 'date_in' field from my database, using ado variant v_Time_Issued vTime_Issued = cpSet->GetCollect(L"date_in"); date_in has the value 2003-04-22 10:19:18.000 i need to be able to format the vTime_Issued so that im just left with the time so all i want from date_in is 10:19 any ideas ????? Si
-
Hi i have the following bit of code which i use to pull the 'date_in' field from my database, using ado variant v_Time_Issued vTime_Issued = cpSet->GetCollect(L"date_in"); date_in has the value 2003-04-22 10:19:18.000 i need to be able to format the vTime_Issued so that im just left with the time so all i want from date_in is 10:19 any ideas ????? Si
Use COleDateTime in your app or modify the SQL getting the date_in from the database to only show the time.
Jason Henderson
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
-
Hi i have the following bit of code which i use to pull the 'date_in' field from my database, using ado variant v_Time_Issued vTime_Issued = cpSet->GetCollect(L"date_in"); date_in has the value 2003-04-22 10:19:18.000 i need to be able to format the vTime_Issued so that im just left with the time so all i want from date_in is 10:19 any ideas ????? Si
If you are using MFC, read on.
COleDateTime datetime; // **ParseDateTime()** is passed a null-terminated string (which you would extract from **v_Time_Issued**) datetime.ParseDateTime("2003-04-22 10:19:18.000"); TRACE("%s\n", datetime.Format("%H:%M"));