[Cppcms-users] date time
Brought to you by:
artyom-beilis
From: mawan s. <ma...@gm...> - 2015-10-06 09:37:42
|
Dear All I want to ask you about how the best way to get current time in timestamp format? Second , how to convert timestamp to date readable format? I have read from blog example like this : std::tm now = booster::ptime::local_time(booster::ptime::now()); and was used as paramter for sql statetment st = sql() << "INSERT INTO posts(author_id,title,abstract,content,publish,is_open) " "VALUES(?,?,?,?,?,?)" << session().get<int>("id") << c.form.title.value() << c.form.abstract.value() << c.form.content.value() << now << open_status << cppdb::exec; can i use time stamp integer value? how to covert std::tm to intenger timestamp? Thanks Mawan |