Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date simple year function does't work (why)

Hi Below is my script. Confused as to why Year or month function does not work, gives me syntax error. Date is in correct format.

Load *,

[Closed Date] - [Create Date] as no_of_days_to_solve;

LOAD

     [Ticket Number],

     [Requestor Name],

     [Support Group],

     [Call Summary],

     [Call Status],

     [Call Severity],

     [Call Type],

    [Create Date],

     Year [Create Date] as year,    // I get syntax error here. I have tried month no luck.

  

    [Closed Date]

FROM  

.......

(biff, embedded labels, table is Sheet1$);

3 Replies
swuehl
MVP
MVP

Try using the Year function with brackets:

Year( [Create Date] ) as year,

suheshreddy
Contributor III
Contributor III

Try using this


Year(Date( Date#([Create Date],'MM,DD,YYYY' )'MM,DD,YYYY' ))as year

jagan
Partner - Champion III
Partner - Champion III

Hi,

You missed brackets () for the Year function, try like this

Load *,

[Closed Date] - [Create Date] as no_of_days_to_solve;

LOAD

     [Ticket Number],

     [Requestor Name],

     [Support Group],

     [Call Summary],

     [Call Status],

     [Call Severity],

     [Call Type],

    [Create Date],

     Year([Create Date]) as year,  

    [Closed Date]

FROM 

.......

(biff, embedded labels, table is Sheet1$);

Regards,

Jagan.