title: Displaying Date and Time in user's device format and language
body: <p>I need to display date and time in user's device settings format (with text "at"). For example:</p>
  
  <p>On US Device it can be: <strong>November 2, 2018 at 5:28:20 PM</strong></p>
  
  <p>On Indian: <strong>2 November 2018 at 17:28:20</strong></p>
  
  <p>On Russian: <strong>2 ноября 2018 в 17:28:20</strong></p>
  
  <p>It should depend on user device preferences and language. Also it should contain seconds. It should look like date and time at user reviews on Google Play console.</p>
  
  <p>Could you please help how to implement it?</p>
  
  <p>p.s. I store datetime information in sqlite and read like this:</p>
  
  <pre><code>String milliseconds = cursor.getString(cursor.getColumnIndex("datetime"));    
  SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");    
  try {
      date = format.parse(milliseconds);
      //But how to format this date now?
      //I found the following two functions:
      Format dateFormat = android.text.format.DateFormat.getLongDateFormat(context);
      Format timeFormat = android.text.format.DateFormat.getTimeFormat(context);
      String finalDateTime = dateFormat.format(date) + " at " + timeFormat.format(date); 
      //But here time without seconds. How to add seconds?
  }
  </code></pre>
  
  <p>Also, maybe there is a more correct way to read it from the database? But it is a second matter.</p>