Tizen Developers

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 on 27 12, 2016

Responses

1 Replies
Kamil N

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

#define __USE_XOPEN
#define _GNU_SOURCE

before #include <Elementary.h>