Ejemplo n.º 1
0
wxOdbcParameter::wxOdbcParameter(const wxDateTime& dateValue)
{
  m_nParameterType = wxOdbcParameter::PARAM_DATETIME;
    	      
  m_DateValue.year = dateValue.GetYear();
  m_DateValue.month = dateValue.GetMonth()+1;
	m_DateValue.day = dateValue.GetDay();
    	    
  m_DateValue.hour = dateValue.GetHour();
  m_DateValue.minute = dateValue.GetMinute();
  m_DateValue.second = dateValue.GetSecond();
  m_DateValue.fraction = dateValue.GetMillisecond();

  m_nBufferLength = 0;
}
Ejemplo n.º 2
0
static void ConvertWxToFileTime(FILETIME *ft, const wxDateTime& dt)
{
    SYSTEMTIME st;
    st.wDay = dt.GetDay();
    st.wMonth = (WORD)(dt.GetMonth() + 1);
    st.wYear = (WORD)dt.GetYear();
    st.wHour = dt.GetHour();
    st.wMinute = dt.GetMinute();
    st.wSecond = dt.GetSecond();
    st.wMilliseconds = dt.GetMillisecond();

    FILETIME ftLocal;
    if ( !::SystemTimeToFileTime(&st, &ftLocal) )
    {
        wxLogLastError(_T("SystemTimeToFileTime"));
    }

    if ( !::LocalFileTimeToFileTime(&ftLocal, ft) )
    {
        wxLogLastError(_T("LocalFileTimeToFileTime"));
    }
}
Ejemplo n.º 3
0
Archivo: main.cpp Proyecto: Hanmac/rwx
VALUE wrap< wxDateTime >(const wxDateTime &st )
{
	if(!st.IsValid())
		return Qnil;
	return rb_time_new(st.GetTicks(),st.GetMillisecond() * 10);
}