Home
The Toolkit for Online Communities
16685 Community Members, 1 member online, 2178 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Calendar

Forum OpenACS Q&A: Calendar

Icon of envelope Request notifications

Collapse
Posted by Rocco Siffredi on
Hellooooo:

I have a litle problem with the f... calendar.

I don't know where to find the data about start-hour, start-date, end-date, etc. when i create a new item.

I know the description and title are in acs-activities, but ...
And the rest?

Zankius.

Pd: No comais chorizo

Collapse
2: Re: Calendar (response to 1)
Posted by Rocco Siffredi on
Another thing

I found the relation time_intervals, and the data of dates.
However i dont't know the type -> timestamptz.

HELP ME

Collapse
3: Re: Calendar (response to 1)
Posted by Jade Rubick on
This is a postgres data type.

Calendar is kind of difficult, maybe you can post what you're trying to do?

Collapse
4: Re: Calendar (response to 3)
Posted by Rocco Siffredi on
Hello Jade:

I want to show the day and the hour like a calendar item  but with another interface and separate too.

Collapse
5: Re: Calendar (response to 1)
Posted by Jade Rubick on
I'm sorry, I don't really understand what you're asking. You may need to provide some more detail. Generally, you'll get about as much time spent on the answers as you spend on the questions :)
Collapse
6: Re: Calendar (response to 5)
Posted by Rocco Siffredi on
I'm sorry too :).
I agree with you and now, I´ll try to be more clear.

Imagine this "universe":

time_intervals:

id|interval_id| start_date          | end_date
-----------------------------------------------------------
n|  n        |2004-08-25 06:00:00+02|2004-08-2506:00:00+02

n= a number.

Well, my question -> How can i get the date and the hour split in start-date ? For example, If i want to show the date only.
It´s possible with the timestamptz type.

Thank you very much.

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. :)

Collapse
7: Re: Calendar (response to 5)
Posted by Rocco Siffredi on
When I told you:
It's possible with timestamptz type, i'll want to tell
Is it possible with timestamptz type ?.