Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

JustinDallas
Valued Contributor

Can't get year or month from Date (qvd attached)

Hello Folks,

I'm running into a peculiar situation, whereby my dates aren't being seen as date.  When I run the below script.

BreadCrumbs:

LOAD

    breadCrumb_Id,

    breadCrumbDateTime,

    YEAR(breadCrumbDateTime)

FROM [lib://\RestrictedDataSet.qvd]

(qvd);

on the attached QVD, I get that the year is blank.

Lyrically.PNG

The only thing that I can think of is that the source for my QVD is a MySQL Community server, and Qlik doesn't know how to get metadata that says "this field is a date field" from the connection.

Any help on why this date isn't being seen as a date would be greatly appreciated.

1 Solution

Accepted Solutions

Re: Can't get year or month from Date (qvd attached)

Load

*,

Date(Floor(breadCrumbDateTime)) as breadCrumbDate,

Time(Frac(breadCrumbDateTime)) as breadCrumbTime

;

LOAD

breadCrumb_Id,

    TimeStamp(TimeStamp#(breadCrumbDateTime,'MM/DD/YYYY hh:mm:ss')) as breadCrumbDateTime

FROM

RestrictedDataSet.qvd

(qvd);

2 Replies

Re: Can't get year or month from Date (qvd attached)

Load

*,

Date(Floor(breadCrumbDateTime)) as breadCrumbDate,

Time(Frac(breadCrumbDateTime)) as breadCrumbTime

;

LOAD

breadCrumb_Id,

    TimeStamp(TimeStamp#(breadCrumbDateTime,'MM/DD/YYYY hh:mm:ss')) as breadCrumbDateTime

FROM

RestrictedDataSet.qvd

(qvd);

JustinDallas
Valued Contributor

Re: Can't get year or month from Date (qvd attached)

Disgusting.