Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[HELP!] Display a date between two dates

Hello,

here is my relationnal model, "Début de validité" and "fin de période de validité" are two dates. I want, in a list of selection, get all the dates between "Début de validité" and "fin de période de validité" by selecting from "Année1" a year and "Mois1" a month. "Année1" and "Mois1" must be included between "Début de validité" and "fin de période de validité". "Année1" and "Mois1" are separated in there list of selection. How to do this ? May i have to change my relationnal model ? I think i don't because to get only the values of année1 and mois1 included between "Début de validité" and "fin de période de validité", theres tables musn't be connected.

Capture10.PNG

Thanks in advance four yours answers.

1 Solution

Accepted Solutions
Not applicable
Author

For all people who need, this syntax work, i need to create another table to have all my values available

EventLog:
LOAD
Year([Début de validité])  as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Month([Début de validité])) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

//[N° Doc. Article] pour relier à la table ERP, relation 1 - 1
OrderLog:
LOAD [N° Doc. Article],[Début de validité], [Fin de la période de validité] FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

Inner Join IntervalMatch ( YMD )
LOAD [Début de validité], [Fin de la période de validité]
Resident OrderLog;

View solution in original post

5 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I think you need here IntervalMatch.

Not applicable
Author

i have already look for intervalmatch, i think they can't be used here

Not applicable
Author

Yes, i have find some exemples for my case. But i you have any suggestions...

Not applicable
Author

I am trying this :

[Intervals]:
LOAD * FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

[Events]:
LOAD
Year([Début de validité]) as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Num(Month([Début de validité]),Day(01))) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

IntervalMatch:
IntervalMatch (YMD)
Load distinct [Début de validité] as DV, [Fin de la période de validité] as FV resident [Intervals];

but it doesn't work, intervalMatch isn't connected to Intervals

Not applicable
Author

For all people who need, this syntax work, i need to create another table to have all my values available

EventLog:
LOAD
Year([Début de validité])  as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Month([Début de validité])) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

//[N° Doc. Article] pour relier à la table ERP, relation 1 - 1
OrderLog:
LOAD [N° Doc. Article],[Début de validité], [Fin de la période de validité] FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

Inner Join IntervalMatch ( YMD )
LOAD [Début de validité], [Fin de la période de validité]
Resident OrderLog;