I have a column called starttime in my 'workout' table in my DB, I am trying to use LocalDateTime to save the start time to that column. In my workout class, I have entered the following:
@JsonFormat(pattern="HH:mm")
@Column(name = "starttime")
private LocalDateTime startTime;
I am then trying to save a testWorkout in my dataloader as follows:
Workout testWorkout = new Workout(LocalDateTime.now(), 88.00);
workoutRepository.save(testWorkout);
when I run my application and check in postgresql / postico, I see the start time as: 2022-02-01 12:53:26.488
How do I get it to just log hours and minutes?
I am fairly new to this so any help would be appreciated.
Thanks