Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
dandaanilreddy
Contributor III

convert the field to a date field

Hello ,

I have a field in which i have the values like below. I want to convert this as a date field. Can someone help me ?

Tue Jul 23 16:03:36 BST 2019
Wed Feb 20 21:28:59 GMT 2019

 

Thanks

Labels (1)
1 Solution

Accepted Solutions
Partner
Partner

Re: convert the field to a date field

You can do it in the script like this:

 

 

LOAD 
	MyTimestamp, 
	makedate(
		SubField(MyTimestamp,' ' , -1),  //Year
		Month(date#(SubField(MyTimestamp,' ' , 2), 'MMM')), //Month
		SubField(MyTimestamp,' ' , 3) //Date
	) as MyDate 
Inline [
MyTimestamp
Tue Jul 23 16:03:36 BST 2019
Wed Feb 20 21:28:59 GMT 2019
];

 

 

clipboard_image_1.png

 

 

Or as a measure in the chart like this.

 

 

=makedate(
SubField(MyTimestamp,' ' , -1),  //Year
Month(date#(SubField(MyTimestamp,' ' , 2), 'MMM')), //Month
SubField(MyTimestamp,' ' , 3) //Date
)

 

 

 

clipboard_image_0.png

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
1 Reply
Partner
Partner

Re: convert the field to a date field

You can do it in the script like this:

 

 

LOAD 
	MyTimestamp, 
	makedate(
		SubField(MyTimestamp,' ' , -1),  //Year
		Month(date#(SubField(MyTimestamp,' ' , 2), 'MMM')), //Month
		SubField(MyTimestamp,' ' , 3) //Date
	) as MyDate 
Inline [
MyTimestamp
Tue Jul 23 16:03:36 BST 2019
Wed Feb 20 21:28:59 GMT 2019
];

 

 

clipboard_image_1.png

 

 

Or as a measure in the chart like this.

 

 

=makedate(
SubField(MyTimestamp,' ' , -1),  //Year
Month(date#(SubField(MyTimestamp,' ' , 2), 'MMM')), //Month
SubField(MyTimestamp,' ' , 3) //Date
)

 

 

 

clipboard_image_0.png

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes