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: 
neha_sri
Creator III
Creator III

Timestamp

Hi All,

I want to find year from this timestamp

13-Mar-2013 11:00:00 AM

how can I do so...

Thanks in anticipation

6 Replies
tresesco
MVP
MVP

Year(TimeStamp#(Yourdate, 'DD-MMM-YYYY hh:mm: ss TT'))

senpradip007
Specialist III
Specialist III

Use this:

Year( Timestamp#('13-Mar-2013 11:00:00 AM', 'DD-MMM-YYYY h:mm:ss TT'))

PrashantSangle

Hi,

Use Year(DatefieldName)

Or

Subfield(DateFieldName,'-',3) as Year

or

Year(Timestamp#(DateFieldName,'DD-MMM-YYYY hh:mm:ss TT')) as Year

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
MayilVahanan

Hi

try like this

Year(floor(Date#('13-Mar-2013 11:00:00 AM','DD-MMM-YYYY hh:mm:ss tt'))) as Year

Replace date with datefield

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
PrashantSangle

Hi,

Change in Subfield() logic as

Subfield(Subfield(DateFieldName,'-',3),' ') as Year

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

dat:

load * Inline

[

d

13-Mar-2013 11:00:00

];

load Year(Date#(d,'DD-MMM-YYYY hh:mm:ss')) as Year Resident dat;