Java tutorial
import java.time.LocalDateTime; import java.time.Month; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { // 2014-04-01 10:45 LocalDateTime dateTime = LocalDateTime.of(2014, Month.APRIL, 1, 10, 45); // format as ISO week date (2014-W08-4) String asIsoWeekDate = dateTime.format(DateTimeFormatter.ISO_WEEK_DATE); System.out.println(asIsoWeekDate); } }