-4

I have an integer value with following.How can I convert integer to Datetime?

int input DateTime=1 6 25;

convert input to output

int output DateTime=1:06:25;

user1137621
  • 5
  • 1
  • 3

1 Answers1

1

With Java 8:

java.time.LocalTime time = java.time.LocalTime.of(hour, minute, second);
Paul Vargas
  • 41,222
  • 15
  • 102
  • 148