C Language: Function to the System Time according to the format [Development Memo]

xiaoxiao2021-03-06  16

/ * Function Description: Get the current system time format YYYYMMMMDDHMMMMMMMMMDHHMMMSS, accurate to second parameter description: Char * CURTIME transmission address, used to return the time string of the specified format, int flag: 1- Time to make YYYYMMDDDHMMSS Format 2 Based on YYYY-MM-DD HH: MM: SS Format 3 - By the time to YYYYMMDD format Return parameters: None (format YYYYMMDDHMMSS or YYYY-MM-DD HH: mm: SS string) * / void get_curtime (int flag, char * timeformat) {char outstr [128]; char STR [100]; TIME_T T; STRUCT TM * GMT, * area;

转载请注明原文地址:https://www.9cbs.com/read-47149.html

New Post(0)