Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Errors: MSVC 6.0, SDI MFC APP. Pin
David Crow20-Jun-06 6:23
David Crow20-Jun-06 6:23 
QuestionRe: Errors: MSVC 6.0, SDI MFC APP. Pin
tingu20-Jun-06 6:28
tingu20-Jun-06 6:28 
AnswerRe: Errors: MSVC 6.0, SDI MFC APP. Pin
David Crow20-Jun-06 6:37
David Crow20-Jun-06 6:37 
GeneralRe: Errors: MSVC 6.0, SDI MFC APP. Pin
tingu20-Jun-06 7:05
tingu20-Jun-06 7:05 
GeneralRe: Errors: MSVC 6.0, SDI MFC APP. Pin
David Crow20-Jun-06 7:29
David Crow20-Jun-06 7:29 
GeneralRe: Errors: MSVC 6.0, SDI MFC APP. Pin
tingu20-Jun-06 8:08
tingu20-Jun-06 8:08 
GeneralRe: Errors: MSVC 6.0, SDI MFC APP. Pin
David Crow20-Jun-06 8:10
David Crow20-Jun-06 8:10 
QuestionCOleDateTime problem ! Pin
AkiraOne20-Jun-06 5:10
AkiraOne20-Jun-06 5:10 
hi all,

I set a COledateTime object:

// DateRec
COleDateTime oleDateRec;
oleDateRec.SetDateTime(anno,
mese,
giorno,
pMonitor->ore,
pMonitor->minuti,
pMonitor->secondi);

with current datetime Ex.(2006,6,20,16,50,23)

When i save oleDateRec.m_dt in a db table field with this insruction:

// Comando SQL
sSqlCommand.Format(_T("INSERT INTO STOPS_MONITOR (StopCode,DateRec,PlantCode,RoomCode,GroupCode,MachCode,CyclePos,OrderCode,StyleCode,StSize,StColor,StLot,Shift)")
_T(" VALUES(%ld,%f,'%s','%s','%s',%ld,%ld,'%s','%s','%s','%s','%s',%d)"),
lStopCode,
---> oleDateRec.m_dt,
sAffiliationPlant,
sAffiliationRoom,
sAffiliationGroup,
DbTfr.addr,
pMonitor->step,
sOrderCode,
sStyleCode,
sStSize,
sStColor,
sStLot,
atoi(tmp_Turno));

in the table STOPS_MONITOR in the field DateRec I see this: 2006, 6, 22

the day is change from 20 to 22!!!!Frown | :( (Frown | :(

Database is a MSSQL Server
the field DateRec is a datetime type. lenght 8

Any idea??

thanks in advanced!!Big Grin | :-D



Too many plans make the health badly!!
AnswerRe: COleDateTime problem ! Pin
led mike20-Jun-06 5:44
led mike20-Jun-06 5:44 
QuestionWin32 Project & ClrButton Pin
69 Bay20-Jun-06 4:48
69 Bay20-Jun-06 4:48 
AnswerRe: Win32 Project & ClrButton Pin
led mike20-Jun-06 5:53
led mike20-Jun-06 5:53 
AnswerRe: Win32 Project & ClrButton Pin
Zac Howland20-Jun-06 6:17
Zac Howland20-Jun-06 6:17 
QuestionCRichEditCtrl set text color Pin
YaronNir20-Jun-06 4:38
YaronNir20-Jun-06 4:38 
AnswerRe: CRichEditCtrl set text color Pin
Viorel.20-Jun-06 4:57
Viorel.20-Jun-06 4:57 
GeneralRe: CRichEditCtrl set text color Pin
YaronNir20-Jun-06 5:39
YaronNir20-Jun-06 5:39 
GeneralRe: CRichEditCtrl set text color Pin
Viorel.20-Jun-06 20:27
Viorel.20-Jun-06 20:27 
QuestionRead/write summary tab info Pin
petergggg20-Jun-06 4:24
petergggg20-Jun-06 4:24 
AnswerRe: Read/write summary tab info Pin
David Crow20-Jun-06 4:33
David Crow20-Jun-06 4:33 
GeneralRe: Read/write summary tab info [modified] Pin
petergggg20-Jun-06 23:00
petergggg20-Jun-06 23:00 
GeneralRe: Read/write summary tab info Pin
David Crow21-Jun-06 2:36
David Crow21-Jun-06 2:36 
Questioncontrol color Pin
yogendra kaushik20-Jun-06 4:15
yogendra kaushik20-Jun-06 4:15 
AnswerRe: control color Pin
see me20-Jun-06 4:25
see me20-Jun-06 4:25 
AnswerRe: control color Pin
Laxman Auti20-Jun-06 5:45
Laxman Auti20-Jun-06 5:45 
AnswerRe: control color Pin
Hamid_RT20-Jun-06 18:57
Hamid_RT20-Jun-06 18:57 
GeneralRe: control color Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:08
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.