"properties{"CreationDate"]
の背後にある項目をJoda-Timeに変換するスクリプトを作成しようとしています。しかし、私は間違いを続けている。メソッド "strftime" for "2/25/2014 10:20":文字列。 Jobaの時刻に変換する
Creationdateは、2014年2月25日の10:20の日付のプログラムのプロパティフィールドです。私はジョバ時代にそれをしたい。このように:2014 M2 25、水10:20:09 GMT + 02:00
私は日付を入力すると、作成日の後ろにあるため、私はスクリプトを作成しません。そしてその後ろには多くの日付があります。
NoMethodError: undefined method `strftime' for "2/25/2014 10:20":String
Did you mean? strip
block in (root) at <script>:6
<main> at <script>:3
Script failed due to an error:
org.jruby.embed.EvalFailedException: (NoMethodError) undefined method `strftime' for "2/25/2014 10:20":String
Did you mean? strip
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:131)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:142)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.nuix.script.e.a(SourceFile:59)
at java.security.AccessController.doPrivileged(Native Method)
at com.nuix.script.e.a(SourceFile:56)
at com.sun.proxy.$Proxy46.eval(Unknown Source)
at com.nuix.script.j.a(SourceFile:53)
at com.nuix.investigator.script.m.e(SourceFile:326)
at com.nuix.investigator.script.m.c(SourceFile:277)
at com.nuix.investigator.script.m.doInBackground(SourceFile:180)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `strftime' for "2/25/2014 10:20":String
Did you mean? strip
at RUBY.block in (root)(<script>:6)
at RUBY.<main>(<script>:3)
変換 'date_time'のstrftimeを使用する前に。 –
Im新品、ルビーの新作、スタートセットは1〜2日前です。どうすれば変換できますか? –
Date.strptimeを使用して、変換する文字列と書式文字列を渡すことができます。 –