How to convert DateTime to Date in Kotlin

I have wirtten a base query get some data…

NutritionInTake
.innerJoin(FoodMaster,{NutritionInTake.foodId},{foodDetails[FoodMaster.id]} )
.innerJoin(Users,{NutritionInTake.userId},{userDetails[Users.id]} )
.slice(NutritionInTake.id, Users.name,FoodMaster.foodname, FoodMaster.carbohydrates, FoodMaster.protein, FoodMaster.fat, NutritionInTake.type, NutritionInTake.qty, NutritionInTake.intakedate)
.select(){( (NutritionInTake.intakedate ) eq onDate) and ((NutritionInTake.userId) eq userId) }
.map{
allNutritionList.add(mapToNutDetDTO(it))
}

IntakeDate is a time stamp and OnDate is only date, because of the time, result is not showing properly, Its a web application.

First: it’s better to not to use Java’s default DateTime, there is a topic about it somewhere. LocalDateTime is modern alternative.
Second: suppose, you need truncatedTo
val today: LocalDateTime = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS)