git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51060
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
void * tempval = table->GetValueAsCustom(row, col,wxGRID_VALUE_DATETIME);
{
void * tempval = table->GetValueAsCustom(row, col,wxGRID_VALUE_DATETIME);
val = *((wxDateTime *)tempval);
hasDatetime = true;
delete (wxDateTime *)tempval;
val = *((wxDateTime *)tempval);
hasDatetime = true;
delete (wxDateTime *)tempval;
if (!hasDatetime )
{
text = table->GetValue(row, col);
if (!hasDatetime )
{
text = table->GetValue(row, col);
- hasDatetime = (val.ParseFormat(text.c_str(), m_iformat, m_dateDef) != (wxChar *)NULL) ;
+ const char * const end = val.ParseFormat(text, m_iformat, m_dateDef);
+ hasDatetime = end && !*end;
}
if ( hasDatetime )
text = val.Format(m_oformat, m_tz );
}
if ( hasDatetime )
text = val.Format(m_oformat, m_tz );
- //If we faild to parse string just show what we where given?
+ // If we failed to parse string just show what we where given?