Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to convert my date field to Dual ?

Hi All

I have below script :-

Date(Monthstart([TempDate]), 'DD-MMM-YY')

as YearMonthDay,

I get number instead of date . So i think if i change the above script to Dual , it should help.

Paul

17 Replies
PrashantSangle

Hi,

try might be it is text not number.

num#()

try like

Date(num#(fieldName))

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 🙂
paulyeo11
Master
Master
Author

Hi Max

when i try your script :-

Date(num#([@50:60T]))  as YearMonthDay,

it return null .

Paul

PrashantSangle

Hi,

Can you post screen shot of your dashboard

Since i am working on personal edition.

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 🙂
paulyeo11
Master
Master
Author

Hi Max

Do you mean this ? ( which i don't think it help you ) it only can show you it work fine in QV only.

screen shot.png

sasiparupudi1
Master III
Master III

Hi

I think your date is a text

Try

Date(Date#([@50:60T],'DD/MM/YYYY'))  as YearMonthDay

hth

Sasi

paulyeo11
Master
Master
Author

Hi Sasi

your script below :-

Date(Date#([@50:60T],'DD/MM/YYYY'))  as Yeafield,rMonthDay,

work in QV but does not work in QS.

if i plot the bar chart directly from YearMonthDay , it work fine. when i use variable it does not work , only happen on this field.

  

still same.png

sasiparupudi1
Master III
Master III

what is the default date format set in your script in QS? is it DD/MM/YYYY or some thing else? please check

SET DateFormat='DD/MM/YYYY';

paulyeo11
Master
Master
Author

Hi Sasi

I have set the date format as your suggest , still the same.

date format.png