Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
];
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
)
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
];
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
)