Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What's is the best way to covert string text
Oct/21/2014
at the Load level
to read
21-Oct-2014
Try this way with Date# and Date functions.
Ex:-
Table:
LOAD Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as NewDate,DateField;
LOAD * Inline
[
DateField
Oct/21/2014
];
No best but different ways depending on your need, a quick way is using Date(date, format) ....
Try this way with Date# and Date functions.
Ex:-
Table:
LOAD Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as NewDate,DateField;
LOAD * Inline
[
DateField
Oct/21/2014
];
Hi
Use Data and Date # function l
try this in text object
=Date(Date#('Oct/21/2014','MMM/DD/YYYY'),'DD-MMM-YYYY')
and same can do in load level just replace date string with your Datefield like
Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as Date
you need 2 function
date# interpretation function from string to number
and then
date formatting function from number to string
in the attachment more detail
you already get the answer in previous post (replace 'Oct/21/2014' with your field)
load
...
date(date#('Oct/21/2014', 'MMM/DD/YYYY'), 'DD-MMM-YYYY') as NewDate
.....
from
....