Difference between revisions of "GetCompanyDates"
From Sega Retro
(Created page with "<includeonly><div style="display:none;">{{#vardefine:companystartdate|{{stripref|{{#dpl: |titlematch={{{1|}}} |noresultsheader= |include={CompanyBob}:founded |mode=userformat...") |
(DPL is too slow) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><div style="display:none;">{{# | + | <includeonly><div style="display:none;">{{#cargo_query: |
− | + | table=companydetails | |
− | | | + | |fields=start,end |
− | | | + | |where=company="{{delink|{{{1|}}}}}" |
− | | | + | |limit=1 |
− | | | + | |default= |
− | + | |more results text= | |
− | + | |format=template | |
− | + | |template=GetCompanyDates/Cargo | |
− | + | }} | |
− | | | ||
− | | | ||
− | | | ||
− | | | ||
− | }} | ||
− | |||
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}} | {{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}} | ||
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}} | {{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}} |
Latest revision as of 06:02, 30 July 2022
Get start and end dates of a company - store in #var:companystartdate and #var:companyenddate
Examples
{{GetCompanyDates|Sega AM1}} {{#var:companystartdate}} {{#var:companyenddate}}
1992-01-01 1999-05-11