【发布时间】:2016-11-19 16:21:02
【问题描述】:
在我的 Json 中,我有下一个输出
......
"publish_date": "2016-07-16 08:09:41"
......
是否可以只解析/提取没有时间的日期,而不调整Json
【问题讨论】:
-
使用子字符串可以忽略最后 8 个字符。
-
谢谢!运行良好
TextView txdate = (TextView)findViewById(R.id.date_item); getDate = getDate.substring(0, getDate.length()-8); txdate.setText(getDate);
标签: android arrays json parsing