title: Obtain Day of the week from epoch
body: <p>I have epoch time and I am trying to get the day of the week. For example lets say I get time as 16/04/2015 16:03:56. I want to find out what day is 16th (Monday, Tuesday... )</p>
  
  <pre><code>scala&gt; import java.text.SimpleDateFormat
  import java.text.SimpleDateFormat
  
  scala&gt; import java.util.{TimeZone, Locale}
  import java.util.{TimeZone, Locale}
  
  scala&gt; dateFormat.setTimeZone(TimeZone.getTimeZone("Etc/UTC"))
  scala&gt; val dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.US)
  </code></pre>
  
  <p>Following code will return time with the date:</p>
  
  <pre><code>scala&gt; dateFormat.format("1429200236824".toLong)
  res2: String = 16/04/2015 16:03:56
  </code></pre>
  
  <p>From this how can I obtain what day is 16th, (above example is in scala but its same is java too)</p>