언어 설정

Menu
Sites
Language
How to convert String to struct tm

Hi

is it possible to convert string "20161227T100500Z" to struct tm in tizen?

I'm trying to do this using function strptime() but I got error:

error: implicit declaration of function 'strptime' is invalid in C99

if its not possible to convert into tm struct maybe there is a way to convert it to different format like: "YYYY-MM-DD HH:MM:SS"

 

Thanks!

Edited by: Kamil N on 27 12월, 2016
답변 바로가기

Responses

1 댓글
Mark as answer
Kamil N

I found solution. I used strptime but I had to add 

#define __USE_XOPEN
#define _GNU_SOURCE

before #include <Elementary.h>