Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getWeekNumberFromSeconds(long secs) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(secs * 1000L); SimpleDateFormat format1 = new SimpleDateFormat("ww"); return format1.format(c.getTime()); } }