Statement: select the name, sex, birthday from the user;
If change birthday to to_char (birthday, "yy - mm - dd) conversion, query birthday is normal, but the result as a string type, but I want to check out the value of the type is date, to receive with CTime, so can't use to_char conversion,
How ah, everyone?
CodePudding user response:
To_char (birthday, 'yyyy - mm - dd HH24: MI),Then use sscanf (string, "% d % d - % d % d: % d: % d", & amp; NYear, & amp; NMonth, & amp; NDate, & amp; NHour, & amp; NMin, & amp; NSec); Split
To define CTime ss (nYear nMonth, nDate, nHour, nMin, nSec);
This should be the fastest