Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Date Format

hi Friends,

I'm having Date format like this 34562.432566.I have used year(Date Field) and Year(Date#(date Field,'M/D/YY'),'MM/DD/YYYY').But i'm not able to retrieve.Please anyone can help me out.

Regards

Krishna

8 Replies
Anonymous
Not applicable

     Date ( floor( [Date Field] ) ) should return the date.

krishna20
Specialist II
Specialist II
Author

Dear Mark,

No Result

Regards

Krishna

Anonymous
Not applicable

What does just [Date Field] return ?

Do bear in mind Qlikview is case sensitive on field names.

ashfaq_haseeb
Champion III
Champion III

Hi Kalyan,

May be you have text date so convert it to Date first.

try below

year(date#(Date,'M/D/YYYY h:mm:ss[.fff] TT') as Year

or try to post some sample data.

Regards

ASHFAQ

Anonymous
Not applicable

Hi,

Try below

Date(Floor(Num#([DateField]))) as Date,

Year(Num#([DateField])) as Year

MarcoWedel

Hi Krishna,

maybe your decimal separator is not set to '.' i.e. your input 34562.432566 is not treated as a number.

Try


SET DecimalSep='.';

in your script.

To test the difference try different Decimal Separators e.g. using this script:

SET DateFormat='MM/DD/YYYY';

SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';

SET DecimalSep='.';

table1:

LOAD * Inline [

Date Field

34562.432566

];

once recognized as a number, 34562.432566 should deliver this date, timestamp and year result:

QlikCommunity_Thread_124480_Pic1.png

hope this helps

regards

Marco

Anonymous
Not applicable

Try this

=date(num(34562.432566))

This should work.

Cheers!

Laxmi

aveeeeeee7en
Specialist III
Specialist III

Use this:

Subfield(NUM(DATE(YOURDATEFIELD,'DD-MM-YYYY')),'.','1') AS NEWDATE

Regards

Aviral Nag