Forum OpenACS Q&A: Re: Calendar

Collapse
8: Re: Calendar (response to 6)
Posted by Orzenil Silva Junior on
Hi,

Supposing you're running postgresql and start_date and end_date are timestampz datatypes you could split date and time with something like this:

for date:

select start_date::DATE from time_intervals

for time:

select start_date::TIME from time_intervals

You could try a real example with acs_objects table in your oacs instalation: select creation_date::DATE from acs_objects

A good reading about dates and times in postgresql is http://techdocs.postgresql.org/techdocs/faqdatesintervals.php . it is a little outdated but still works :)

Collapse
9: Re: Calendar (response to 8)
Posted by Rocco Siffredi on
Thanks Orzenil.

And the force may be with you. :)