fmpp(フリーマーカー)で変換したいcsvファイルがあります。最初の列は長い値(1.1.1970からのミリ秒)であり、日付に変換して日時としてフォーマットします。
src形式:
timeStamp,elapsed,label,responseCode,threadName,dataType,success,bytes,URL,Latency
1319115474244,40142,Login,200,Login 1-2,text,true,862184,http://localhost:8080/xxx,5378
望ましいターゲットフォーマット:
timeStamp;elapsed;label;responseCode;threadName;dataType;success;bytes;URL;Latency
20.12.2011 13:45;40142;Login;200;Login 1-2;text;true;862184;http://localhost:8080/xxx;5378
私の(実行中の)テンプレート:
<#list csv.headers as h>${h}<#if h_has_next>;</#if></#list>
<#list csv as row>
<#list csv.headers as h><#if h_index == 0>Do the date magic<#else>${(row[h]!"N/A")?string}</#if>$<#if h_has_next>;</#if></#list>
</#list>
列0の場合、変換を実行します。日付を含む新しいモデルを書きたくありません。私の質問は、freemarkerやfmppを変更せずにテンプレートでこれを実行できるかどうかです。
何か案は?