Thank you Tobias! That looks very good. Unfortunately it doesn't produce 
what I want and I suspect it has something to do with my "fdatum"-field. It 
doesn't contain a date object, but a string like yyyy-mm-dd. The result is 
something like this (which isn't in date order):

DatumMail2013-10-21  ,[email protected]  [email protected],
2013-09-18  [email protected],[email protected]  
[email protected],2014-02-01   
[email protected],[email protected]  
[email protected],

On Tuesday, September 24, 2013 8:39:01 PM UTC+2, Tobias Beer wrote:
>
> Something like...
>
> var tids = store.sortTiddlers(store.getTaggedTiddlers("kundkort"), 
> 'fdatum');
>
> Ah, here's your transclusion assuming you want the last 60 days...
>
> <<tiddler ListaTB14Email##out with: {{
> var now = new Date(),
> out=['!!!Email TB14\n|sortable|k\n|Datum|Mail|h'];
> field = 'fdatum',
> tag = 'kundkort';
>
> store.sortTiddlers(
> store.getTaggedTiddlers(tag),
> field
> ).map(function(t){
> var d = new Date(store.getValue(t,field));
> if((now - d) < 2*30*24*60*60*1000)
> out.push(
> "|%0|%1,%2|".format([
> d.formatString('YYYY-0MM-0DD'),
> store.getValue(t,"email"),
> store.getValue(t,"email2")
> ])
> );
> });
> out.join('\n');
> }}>>
>
> - tobias
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to