How to combine date and time into a single object?

后端 未结 3 1563
终归单人心
终归单人心 2020-12-01 23:36

my dao page is receiving date and time from two different field now i want know how to merge these both date and time in a single object so that i calculate time difference

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 00:23

    Simple yet effective would be:

    LocalDateTime dateTime = LocalDateTime.of(datePart, timePart);
    

提交回复
热议问题