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: 
Not applicable

urgent?

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

1 Solution

Accepted Solutions
its_anandrjs

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

View solution in original post

9 Replies
arulsettu
Master III
Master III

HI

month(postingdate) as month,

year(postingdate) as year,

date(postingdate) as date

its_anandrjs

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

its_anandrjs

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

ashfaq_haseeb
Champion III
Champion III

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

Not applicable
Author

my date format is like

1/1/2014 12:02:15 AM

ashfaq_haseeb
Champion III
Champion III

In any case above should work

Regards

ASHFAQ

MK_QSL
MVP
MVP

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

====================================================

Not applicable
Author

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

its_anandrjs

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