336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

개념 : 


1. 원형 : size_t strftime(char *strDest, size_t maxsize, const char *format, const struct tm *timeptr)



소스코드:


#include<stdio.h>

#include<time.h>


int main(void)

{

time_t now;

struct tm t;

char buff[100];


now = time(NULL);

t = *localtime(&now);


strftime(buff, sizeof(buff), "%Y-%m-%d %I : %M : %S %p", &t);


puts(buff);


system("pause");

return 0;

}



결과:






+ Recent posts