Ya i am using cji-time. Found a way .
(def multi-parser (f/formatter (t/default-time-zone) "dd:MM:YYYY
HH:mm:ss" "YYYY-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 (f/formatter "dd:MM:yyyy HH:mm:ss"))
(def subtractedtime
(l/format-local-time (t/minus (f/parse custom-formatter
currenttimestamp) (t/months 60) ):mysql))
(def required-timestamp (f/unparse multi-parser (f/parse multi-parser
subtractedtime)))
I retrieved currenttimestamp in format i need and then subtracted 5 years
(60 months) to get the required-timestamp.This above code snippet works .
But i know there is a redundancy in my code bcoz multi-parser and
custom-formatter are intended to do same thing .Not sure how to optimise
the above code.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.