I have the same error above "clojure.lang.PersistentVector cannot be cast
to java.lang.String" . but when i use ByteArrayInputStream i have
"clojure.lang.PersistentList
cannot be cast to java.lang.String" . don't know how to fix it .I want to
retrieve data between 2 timestamp values . i have some 800 rows in my data
.My code snipper below: Please let me know where am i wrong .
(def info-tap
(<- [?timestamp ?value]
((select-fields info ["?timestamp" "?value"]) ?timestamp ?value)))
(def datefrom "12:05:2010 10:00:00")
(def custom-formatter (f/formatter "dd:MM:yyyy HH:mm:ss"))
(def start-value (ct/to-long (f/parse custom-formatter datefrom)))
(def dateto "12:05:2010 11:00:00")
(def end-value (ct/to-long (f/parse custom-formatter dateto)))
(defmacro convert-to-long [a]
(ct/to-long (f/parse custom-formatter a)) )
(?<- (stdout)[?timestamp ?value](info-tap ?timestamp ?value)
(> convert-to-long[?timestamp] start-value)
(< convert-to-long[?timestamp] end-value))
I my code i am converting timestamp strings to long (numbers ) so that i
can compare .But ?timestamp field have 800 entries (rows) of timestamps .
but custom-formatter is expecting a string. How do i deal with it .
>
--
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.