dev/c/dtparser_test/File1.cpp

35 lines
931 B
C++

//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <tchar.h>
//---------------------------------------------------------------------------
#pragma argsused
#include <stdio.h>
#include "insys_parser/vcl/DataFilesFunctions.hpp"
int _tmain(int argc, _TCHAR* argv[])
{
std::string s = "2010.10.22 11:12:13.14";
printf("%s\n", s.c_str());
prec_tm dt = datetime_sscanf(s.c_str());
printf("year = %.4d\n", dt.tm.tm_year + 1900);
printf("month = %.2d\n", dt.tm.tm_mon + 1);
printf("day = %.2d\n", dt.tm.tm_mday);
printf("hour = %.2d\n", dt.tm.tm_hour);
printf("min = %.2d\n", dt.tm.tm_min);
printf("sec = %.2d\n", dt.tm.tm_sec);
printf("ssec = %.2d\n", dt.ss);
AnsiString as = "123";
printf("%c\n", as[1]);
system("pause");
return 0;
}
//---------------------------------------------------------------------------