https://github.com/mbossenbroek/simple-time
(require '[simple-time.core :as t])
(t/format (t/now) dd:MM: HH:mm:ss)
= 01:05:2014 21:16:27
On Tuesday, April 29, 2014 5:03:01 AM UTC-5, sindhu hosamane wrote:
How to convert the current date and time to the format i need ? for
example i
How to convert the current date and time to the format i need ? for
example i retrieve current time using (l/local-now) which outputs
#DateTime 2014-04-29T11:16:02.420+02:00
i want the above output to be converted to format dd:MM: HH:mm:ss
Should i define my own formatter like below
Hi ,
I didn't verify if that particular formatter comes prepackaged ( I am
assuming you are using clj-time since it is not mentioned..) Once you have
created your custom formater all you have to do is unparse
(clj-time.formatter/unparse date-time-object custom formatter ) .
This is there in the
Ya i am using cji-time. Found a way .
(def multi-parser (f/formatter (t/default-time-zone) dd:MM:
HH:mm:ss -MM-dd HH:mm:ss))
(def currenttimestamp
(f/unparse multi-parser (f/parse multi-parser (l/format-local-time (
l/local-now) :mysql))) )
(def custom-formatter