嗨,我有两个字符串:
entertime "2014-03-06T09:35:36Z"
exittime "2014-03-06T09:38:36Z"
我希望能够返回差异,在这种情况下应该返回 3 分钟。
我的方法如下所示:
boost::gregorian::date returnTime(std::string entertime, std::string exittime){
boost::gregorian::date denter = boost::gregorian::from_string(entertime);
boost::gregorian::date dexit = boost::gregorian::from_string(entertime);
boost::gregorian::date dresult = dexit-denter;
有什么办法可以得到这个时差吗?
先感谢您!