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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

connect my calender with Text Date without ($Syn) ??

Hi All

I have problem with customer that use Arabic date. we fix this issue by table contain G-Date and Arabic Date. but now the issue all the date on all table is text, i try to formated by ( Date(Date#(PRM_Date,'YYYY/MM/DD')) ) but doesn't work [:(] , so what i did i create new filed on my calender call (THijri) it's same arabic date but as text, i linked to one table (BSCA) and it's work 100% [:D].

now the main issue: how can i link to other table?? like (VACA -Table) it's tale for vacation and contain more than 5 filed for date only and same issue with too many table.

any advice?

Thanks for all ,

error loading image

1 Solution

Accepted Solutions
stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

In your previous post you indicated you were using Date(Date#(PRM_Date,'YYYY/MM/DD')). However, if this PRM_Date is in YYYYMMDD format then you need to use that in the Date# function - that is what the 2nd parameter of Date# is! So Date(Date#(PRM_Date,'YYYYMMDD'))

Once you have dates in ISO format then you can perform simple arithmetic between them (Date1-Date2) to get the difference in days between them.

Regards,

Stephen

View solution in original post

6 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

You can load the field that maps correctly all Date fields as a Mapping Table, then ApplyMap() the correct date to the other tables in the Load commands.

You can also use the text Date field as the key and use a kind of Link Table with the correct date linked through the text unique Date key. The correct date will exist only in the link table, then there wouldn´t be an $Syn.

Hope it helps

Fernando D'AgostoYes

stephencredmond
Partner - Specialist II
Partner - Specialist II

A couple of things here.

First, you say that the Date# option doesn't work - what do you mean it doesn't work? Have you examined what is being returned by this function? In the data source, is the date actually being stored as text? I understand that the arabic dates are very different, but are they, under the hood, actually stored as numbers anyway? This is how dates are normally stored in databases and then converted for display.

If they are text, and you are creating a mapping table to map to ISO dates, why are you using text for the ISO dates - why not use numeric dates instead? If you absolutely need to use text, then watch out for what text you are using - do you have a time portion, e.g. "00:00:00", at the end of the text?

Date(Date#('2010/04/29', 'YYYY/MM/DD'), 'DD/MM/YYYY')

Will work perfectly well.

Date(Date#('2010/04/29 00:00:00', 'YYYY/MM/DD'), 'DD/MM/YYYY')

Won't work

Date(Date#(Left('2010/04/29 00:00:00', 10), 'YYYY/MM/DD'), 'DD/MM/YYYY')

Will work.

On the other question, do you really want to connect all the dates together? If you do then you will need to construct a key table to match them. You might think about which ones are really connected.

Stephen

Stephen Redmond

CTO, Capricorn Ventis Ltd.

QlikView Elite Partner

Not applicable
Author

Thanks Fernando D. T. , but this is 24 date filed and this only for small report

Not applicable
Author

Hi Stephen Redmond

actually the Date#() return empty filed for me and i guess that because of arabic date come like (1431/10/23) and my data is Text filed and contain only 8 digit as YYYYMMDD.

and for the connection it's so important because they have deferent calculation for vacation specially if there is promotion so i have to caculate the date from more than to table ( BSCA - VACA -PRMA - DISA) ...!!!

thanks again for your advice

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

In your previous post you indicated you were using Date(Date#(PRM_Date,'YYYY/MM/DD')). However, if this PRM_Date is in YYYYMMDD format then you need to use that in the Date# function - that is what the 2nd parameter of Date# is! So Date(Date#(PRM_Date,'YYYYMMDD'))

Once you have dates in ISO format then you can perform simple arithmetic between them (Date1-Date2) to get the difference in days between them.

Regards,

Stephen

Not applicable
Author

Thaaaaaaaanks Stephen,

it's showing as date Big Smile i will check the calculation and come back to you, i hope it's work

with me,

Thanks for all the support you giving to beginner like me Smile