Gowtham Raj R

Gowtham Raj R

  • NA
  • 20
  • 31.8k

How to Change format DateTime column in query for sqlite?

Jun 1 2015 1:45 AM

I want my datetime table column in %Y-%m-%d %H:%M:%S format


I am using

SELECT AIRPORT_NAME , strftime('%Y-%m-%d %H:%M:%S', 'CREATETS')as crts FROM AIRPORT_MASTER where AIRPORT_MASTER_ID = 1;

CREATETS is my datetime column having data in "21-03-2011 12:00:00.000000" format

This as query but doesn't work fine in my case, sqlite don't show any error but no output in this case help me to get

"2011-03-21 08:55:36" as output format ---------> While select Whole column from sqlite



Answers (3)