Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have a field names are postingdate,
and cuid, in this i want get month and year and date in different field and
In the postingdate field my date
format is like this 1/1/2014 12:02:15 AM
Try to load like
LOAD
Date#(postingdate,'m/d/yyyy hh:mm:ss TT') as postingdate,
Year(Date#(postingdate,'m/d/yyyy hh:mm:ss TT')) as Year,
MOnth(Date#(postingdate,'m/d/yyyy hh:mm:ss TT')) as MOnth;
LOAD * Inline
[
postingdate
1/1/2014 12:02:15 AM
];
Regards
Anand
HI
month(postingdate) as month,
year(postingdate) as year,
date(postingdate) as date
Try to load like
LOAD
Date#(postingdate,'m/d/yyyy hh:mm:ss TT') as postingdate,
Year(Date#(postingdate,'m/d/yyyy hh:mm:ss TT')) as Year,
MOnth(Date#(postingdate,'m/d/yyyy hh:mm:ss TT')) as MOnth;
LOAD * Inline
[
postingdate
1/1/2014 12:02:15 AM
];
Regards
Anand
Or if it is in proper date format then use
LOAD
Date(postingdate,'m/d/yyyy hh:mm:ss TT') as postingdate,
Year(postingdate) as Year,
Month(postingdate) as Month;
From Location;
Regards
Anand
Like this
Load
Date(Date#(Date,'M/D/YYYY HH:MM:SS TT')) as PostingDate,
Year(Date#(Date,'M/D/YYYY HH:MM:SS TT')) as Year,
Month(Date#(Date,'M/D/YYYY HH:MM:SS TT')) as Month;
load * Inline
[
Date
1/1/2014 12:02:15 AM
]
Regards
ASHFAQ
my date format is like
1/1/2014 12:02:15 AM
In any case above should work
Regards
ASHFAQ
Load
postingdate,
Month(postingdate) as Month,
Year(postingdate) as Year,
Date(Floor(postingdate)) as Date;
Load
TimeStamp#(postingdate,'d/m/yyyy hh:mm:ss TT') as postingdate
Inline
[
postingdate
1/1/2014 12:02:15 AM
];
====================================================
Considering that your TimeStamp and date is in D/M/YYYY format...
If it is in M/D/YYYY, you can chagne
TimeStamp#(postingdate,'D/M/YYYY hh:mm:ss TT') as postingdate
to
TimeStamp#(postingdate,'M/D/YYYY hh:mm:ss TT') as postingdate
====================================================
Yes it is right
LOAD
Date(postingdate,'m/d/yyyy hh:mm:ss TT') as postingdate,
Year(postingdate) as Year,
Month(postingdate) as Month;
From Location;
I use in my app also
Thanks E
Hi,
Why are you replying exactly the same reply to the post which exactly same copy of my reply post some thing different.
Regards
Anand