current position：Home>Java gets the date of the previous day
Java gets the date of the previous day
2022-05-15 05:15:44【A grain of rice】
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf2= new SimpleDateFormat("yyyy-MM-dd 20:00:00"); Date day = sdf1.parse(String.valueOf(dayNow.split(" "))); long ms = day.getTime() - 1*24*3600*1000L; Date prevDay = new Date(ms); String dayBefore=sdf2.format(prevDay); String dayToday=sdf2.format(new Date(day.getTime())); System.out.println(" yesterday 20 spot ："+dayBefore); System.out.println(" today 20 spot ："+dayToday);
author[A grain of rice],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Language model what is language model?
- What platforms have the Dharma Institute language laboratory built?
- How to develop UI component library (heavy UI) based on Vue
- My colleague told me that the reason why his code is silky is that he uses mybatis plus?
- Artificial intelligence is undoubtedly a very hot research direction at present. According to the development level of artificial intelligence, which stages will researcher Shiluo divide it into?
- What are the problems and challenges of rate adaptive technology?
- How to make the video clearer?
- What is neurolinguistic model and representation learning?
- What are the two kinds of traditional language model construction?
- The best configuration for IntelliJ idea development
guess what you like
How to count the number of words in English text through C language?
On the problem of C language: the division of students' grades
The interactive search system adopts the modular design idea. According to the hierarchical logical structure, which levels are divided into?
Common problems and solutions of get technology message middleware application
How to deal with facial beauty when achieving facial beauty effect?
In order to achieve the effect of facial beauty, what are we mainly through in technology?
How to watch hot dramas on vertical screen?
Three party application login access GitHub scheme
Online FAQ positioning FAQ what does high CPU utilization mean?
Online FAQ positioning FAQ what is the cause of the high load problem?
- Why do we do quality evaluation?
- What is the function of getstatic, a common tool for online FAQs?
- Android 11 new soft keyboard occlusion / animation solution
- Common tools for online FAQs include?
- How does SAP commerce cloud configure new applications for storefront
- In the CMS GC process, what is the reason why the business thread puts objects into the old generation (the characteristics of concurrent collection)?
- How good and accurate is the recommendation?
- Online FAQ positioning FAQs what are the causes of continuous GC problems?
- Does the data reflect the real viewing experience?
- What are the reasons for fullgc (throw oom if FGC recovery is invalid)?
- Algorithm improvement - basic algorithm (turtle speed multiplication)
- [C + +] sword finger offer 10 - I. Fibonacci sequence
- Online FAQ positioning FAQ nosuchmethodexception what is the cause of the problem?
- IOS enables native im development
- What is the common function of SM?
- "Automated testing" a new generation of Web front-end automated testing framework - playwright, get started quickly!
- Online FAQ positioning FAQ what is the cause of the high load problem?
- What is the function of watch, a common tool for online FAQs?
- Timeliness in recommender systems, Zhang Fuguo et al. ESWA 2017
- Alibaba's open source Java diagnostic tool uses what methods to diagnose.
- What is the function of dashboard, a common tool for online FAQs?
- What is the role of JAD, a common tool for online FAQs?
- Online FAQ positioning FAQ what are the causes of high CPU utilization?
- 07 - explore the underlying principles of IOS | several OC objects [instance object, class object, metaclass], ISA pointer of object, superclass, method call of object and the underlying essence of class
- Extreme fox gitlab settled in Alibaba cloud computing nest to jointly improve the development experience on the cloud
- How does artificial intelligence help natural science
- Elementui upload file
- Modern CSS solution: CSS mathematical functions
- Create a general efficiency improvement solution for front desk + middle desk based on vue3 (network disk link)
- Brush 100 front-end high-quality interview real questions in 2 weeks, and the source code is complete
- Vue has reduced its workload by half since using components
- I built a front-end mock tool
- About uboot -- Ping virtual machine Ubuntu operation
- Video transcoder editready for Mac
- [taro] taro gets the detailed attributes of the element (solved)
- Picture and text difference comparison tool: kaleidoscope for Mac
- Background of spatiotemporal artificial intelligence
- The top 10 of oceanbase database competition was born, and the integration of industry and education accelerated the training of database talents
- China brand Day ｜ Youxuan software: strengthen its own brand and fight for China's database industry
- New feature release of gaussdb (for redis): enhanced prefix scanning and multi rent isolation