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;
}
결과:
'Programing - C > C Basic grammar ' 카테고리의 다른 글
134 삼각 함수 아크 사인 구하기(asin) (0) | 2018.12.12 |
---|---|
133 삼각 함수 sin 값 구하기(sin) (0) | 2018.05.13 |
131 미국식 날짜및 시간( asctime ) (0) | 2018.05.13 |
130 날짜 및 시간 차이 (difftime) (0) | 2018.05.13 |
129 날짜 및 시간을 더하거나 빼기( mktime ) (0) | 2018.05.13 |