私は文字列 x = "1086073200000" を持っています。これは基本的に、日付に変換する必要があるミリ秒です。
私が使用している変換するには
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
long tempo1=Long.parseLong(x);
System.out.println(tempo1); // output is 86073200000 instead of the whole thing
long milliSeconds=1346482800000L;
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(milliSeconds);
System.out.println(formatter.format(calendar.getTime()));
問題は、文字列 x を long に変換すると、 long のサイズの制限により一部の桁がなくなることです。
文字列全体を保持するにはどうすればよいですか。
ありがとう。