Skip to content
Prev 8015 / 15274 Next

millisec timestamps for rows of xts/zoo object

On 5 June 2011 at 20:14, Ulrich Staudinger wrote:
| Hi Dirk,
| 
| but I don't have a POSIXct object, I have an xts time series object and want

Are you sure?  What does 

    class( index ( tempBs ) )

return?  And are you sure that time index for xts cannot be casted into POSIXct?

| the timestamps as seconds/milliseconds with the goal to save it to a database
| ...

Yes. POSIXct is 'just' a double with millseconds resolution which can be
passed down to C/C++, stored in a DB, etc pp with ease just because it can
reduce to a double (if you are willing to forego attributes such as local
timezones etc).

Dirk