It gives the error in the title about this piece of code:
string DDateTime::date2OracleDate(DATE Date)
{
string s;
s="TO_DATE('" + DateFormat("%d/%m/%Y",Date) + "','dd/MM/YYYY')";
return s;
}
I don't understand how that is possible, no pointers involved....
EDIT:
string DDateTime::DateFormat(string sFormat,DATE Date)
{
struct tm tmTemp;
RipOf_AfxTmFromOleDate(Date, tmTemp);
RipOf_AfxTmConvertToStandardFormat(tmTemp);
char sFormatted[MAX_TIME_BUFFER_SIZE];
strftime(sFormatted, MAX_TIME_BUFFER_SIZE, sFormat.c_str(), &tmTemp);
return sFormatted;
}
The following should work better:
string DDateTime::date2OracleDate(DATE Date)
{
string s = "TO_DATE('";
s += DateFormat("%d/%m/%Y",Date);
s += "','dd/MM/YYYY')";
return s;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With