Date field - from & to

562
6
Jump to solution
06-21-2021 04:45 AM
NovicaJ
New Contributor III

I have a date field which I'd like it to be a date field with two values - from & to. I need it to be like a range. 
Have two values, a starting date and and end date.

NovicaJ_0-1624276153805.png

Can this be done somehow?

0 Kudos
1 Solution

Accepted Solutions
Marten
by
New Contributor III

yes, this is possible. you would want to stick to the way this is done in ISO 19115/19139 metadata for time period type extents though. See for example this snippet:

<gmd:temporalElement>
  <gmd:EX_TemporalExtent>
    <gmd:extent>
      <gml:TimePeriod gml:id="1624374152364r23014781936280926">
        <gml:beginPosition>2021-06-01</gml:beginPosition>
        <gml:endPosition>2021-06-22</gml:endPosition>
      </gml:TimePeriod>
    </gmd:extent>
  </gmd:EX_TemporalExtent>
</gmd:temporalElement>


you can find this in the INSPIRE dataset editor in Identification > Resource > Extent > Temporal Extent.

the code for this can be found in: inspire/gmd/extent/TemporalElement.js and the associated template.

View solution in original post

0 Kudos
6 Replies
Marten
by
New Contributor III

yes, this is possible. you would want to stick to the way this is done in ISO 19115/19139 metadata for time period type extents though. See for example this snippet:

<gmd:temporalElement>
  <gmd:EX_TemporalExtent>
    <gmd:extent>
      <gml:TimePeriod gml:id="1624374152364r23014781936280926">
        <gml:beginPosition>2021-06-01</gml:beginPosition>
        <gml:endPosition>2021-06-22</gml:endPosition>
      </gml:TimePeriod>
    </gmd:extent>
  </gmd:EX_TemporalExtent>
</gmd:temporalElement>


you can find this in the INSPIRE dataset editor in Identification > Resource > Extent > Temporal Extent.

the code for this can be found in: inspire/gmd/extent/TemporalElement.js and the associated template.

View solution in original post

0 Kudos
NovicaJ
New Contributor III

Marten,

Any other changes I need to make in order to save the metadata, regarding the temporal element? Once I click save, I get error 500 in console.

I think I also had to make changes, in other words add the new temporal element field in the Evaluator classes?

0 Kudos
Marten
by
New Contributor III

without seeing the editor, the XML, and/or the error, that is hard to say. Can you share screenshots/files of these 3 things? Does the editor allow you to view the XML? if so, can you add an example here of that?

0 Kudos
NovicaJ
New Contributor III

Here is a link for the geoportal and here is the error I get

NovicaJ_0-1624401478592.png

 

0 Kudos
NovicaJ
New Contributor III

NovicaJ_0-1624402637906.png

as well as this

0 Kudos
NovicaJ
New Contributor III

Marten, I figured it out. Thank you for your help!