任何人都可以让我知道如何在excel中保持'08'或'09'等.. 因为当我输入08并保存它变为8.
我想在小数前面保持0
当我使用“mon-d-yyyy”将日期转换为字符时遇到以下问题,因为我需要单日数字来表示一个月中 1 到 9 天的值。
当我使用“mon-d-yyyy”格式时,我丢失了 5 天并得到了错误的日期。对此的任何帮助都会很棒。
select to_char(sysdate-22,'mon-d-yyyy') from dual;--aug-2-2017
select to_char(sysdate-22,'mon-dd-yyyy') from dual;--aug-07-2017
select sysdate-22 from dual;--07-AUG-17 11.06.43
Run Code Online (Sandbox Code Playgroud) 如何删除下面代码中的键值对与HashMap中的元素进行比较?
Map<BigDecimal, TransactionLogDTO> transactionLogMap = new HashMap<BigDecimal, TransactionLogDTO>();
for (BigDecimal regionID : regionIdList) {// Generation new logDTO
// objects for each in scope
// region
transactionLogMap.put(regionID, new TransactionLogDTO());
}
Set<BigDecimal> inScopeActiveRegionIdSet = new HashSet<BigDecimal>();
for (PersonDTO personDTO4 : activePersons) {
inScopeActiveRegionIdSet.add(personDTO4.getRegion());
}
for (BigDecimal bigDecimal : transactionLogMap.keySet()) {
if (!inScopeActiveRegionIdSet.contains(bigDecimal)) {
transactionLogMap.remove(bigDecimal);
}
}
Run Code Online (Sandbox Code Playgroud) 我面临以下问题:
与临时值相比,我将获得类似或更长的值:
public class NumberFormat {
public static void main(String arg[]){
Integer numValue = null;
String temp="5474151538110135";
numValue=Integer
.parseInt(temp.trim());
System.out.println("--> "+numValue);
}
}
Run Code Online (Sandbox Code Playgroud)
请提供解决方案.
Exception in thread "main" java.lang.NumberFormatException: For input string: "5474151538110135"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:60)
at java.lang.Integer.parseInt(Integer.java:473)
at java.lang.Integer.parseInt(Integer.java:511)
at com.filetransfer.August.NumberFormat.main(NumberFormat.java:10)
Run Code Online (Sandbox Code Playgroud)