Hi, Gaurav,

Since FastBit does not support date/time, you will need to do this by
yourself.  Depending on what you have to start with, you will have to
do something quite different.  For example, if you have days numbered
consecutively from 0 to 365 (in the first year), then converting to
week is simply dividing by 7 (and take the floor of the result).
However, if you have another encoding of days, say YYYYMMDD, then you
can easily extract year, month and day, but computing the day of week
would be a nightmare.

Good luck.

John


On 7/20/12 6:58 AM, Gaurav Agarwal wrote:
> Hi John,
> 
> I have another suggestion/question - date_trunc is a very useful
> feature for performing time-rollups. For instance if I had daily
> records, I could use date_trunc to get weekly sum for columns. Could
> you pls guide me on how to implement this in fastbit? What should be
> the starting-point and a general sketch of the implementation?
> 
> cheers,
> gaurav
> 
> 
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to