cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping the earliest date

Former Member
0 Kudos

I have a DateTime field at item level in my source structure in the following format 2006-05-11T13:00:00+01:00. In my target structure I want to hold earliest date for all items.

eg.

<b>Source</b>

<ITEM>

<DATETIME>2006-05-11T13:00:00+01:00</DATETIME>

</ITEM>

<ITEM>

<DATETIME>2006-05-12T13:00:00+01:00</DATETIME>

</ITEM>

<ITEM>

<DATETIME>2006-05-13T13:00:00+01:00</DATETIME>

</ITEM>

<b>Target</b>

<DATE>2006-05-11</DATE>

Any ideas?

Message was edited by: Mark Briggs

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Mark,

You can use the standard function 'sort' with ascending option.

praveen

former_member187339
Active Contributor
0 Kudos

Hi,

Map directly if the occurence of target date is 1..1...

Else sourcedatetimeremoveContextcollapseContext--targetdatetime.

Regards

Suraj

former_member206604
Active Contributor
0 Kudos

Hi,

sourcedatatime-->removeContext-->User-Defined Func-->targetdateime

User-Defined Function

.Loop and find the earlist date

.Fill in the ResultList with the earliest date

Hope this should also work..

Thanks,

Prakash