Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Date ( floor( [Date Field] ) ) should return the date.
Dear Mark,
No Result
Regards
Krishna
What does just [Date Field] return ?
Do bear in mind Qlikview is case sensitive on field names.
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
Hi,
Try below
Date(Floor(Num#([DateField]))) as Date,
Year(Num#([DateField])) as Year
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:
hope this helps
regards
Marco
Try this
=date(num(34562.432566))
This should work.
Cheers!
Laxmi
Use this:
Subfield(NUM(DATE(YOURDATEFIELD,'DD-MM-YYYY')),'.','1') AS NEWDATE
Regards
Aviral Nag