Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Format date/time column to Year, Month, Day, Hour, Minutes

I have a SQL server data load that imports a column in the format

It is very difficult to manipulate this raw data for creating charts.  The time is too granular.  How can i format the time/date so that it is useable.  Here is now it loads from my SQL database.  I would like to parse the data out so that I have Year, Month, Day, Hour, and Minute Columns..

10 Replies
Anonymous
Not applicable
Author

I was able to parse out the data as needed with the following preceding Load statements before my SQL code..

/* Formatting TimeSent to Month, Day, and Year (transform Month to numerical value)*/

LOAD *, num(month(TimeSent)) & '/' & day(TimeSent) & '/' & year(TimeSent) as Date ; /*

Load *,
month(TimeSent) as Month, /* creating Month Field */
day(TimeSent) as Day, /* creating Day Field */
year(TimeSent) as Year /* creating Year Field */