我"2016-10-25T00:14:30.000"在 PostgreSQL 中有一个字符串。
我想将时间戳转换为整数,例如:1477354441
我想为该值添加自定义分钟,例如 1477354441+544(minutes) = 1477387081
如何在 PostgreSQL 中实现这一点?
我有一个JSONObject
{"2016":{"12":{"20":{"19":{"DonationTime":11111111111,"Donation":10}}}}}
Run Code Online (Sandbox Code Playgroud)
我想用每个键将它转换为新地图
int i = 0;
for (Iterator<String> keysItr = object.keySet().iterator(); keysItr.`hasNext(); i++) {
String key = keysItr.next();
Object value = object.get(key);
if(value instanceof JSONObject) {
value = toMap((JSONObject) value);
map.put(key, value);
}
}
SOP(map); //but here i want to get 4 maps
}
Run Code Online (Sandbox Code Playgroud)
我想得到4张地图
hourMap[19] = "{"DonationTime":11111111111,"Donation":10}";
dayMap[20] = "{"19":{"DonationTime":11111111111,"Donation":10}}";
monthMap[12] = "{"12":{"20":{"19":{"DonationTime":11111111111,"Donation":10}}}";
yearMap[2016] = "{"12":{"20":{"19":{"DonationTime":11111111111,"Donation":10}}}";
Run Code Online (Sandbox Code Playgroud)
我正在使用for循环但我无法获得i的递增值.