c++ builder xe2 字符串转日期

 TFormatSettings * fmt = new TFormatSettings;
    fmt->ShortDateFormat = L"yy-mm-dd";
    fmt->DateSeparator = L'-';
    fmt->LongTimeFormat = L"hh:nn:ss";
    fmt->TimeSeparator = L':';
    UnicodeString str = L"13-09-12 09:23:43";
    TDateTime dt = StrToDateTime(str,*fmt);
    delete fmt;
    ShowMessage(dt.FormatString("yyyy年,mm月,dd日,hh时,nn分钟,ss秒"));
c++ builder xe2 字符串转日期

 

上一篇:MySQL参数sql_safe_updates在生产环境的使用


下一篇:sql 截取字符串