Hi,
The sys_contentstartdate is the default field for any content type and its format is YYYY-mm-dd. I want a field for start date wherein the user may have the ability to enter the time as well as the time zone (like PST, MST, CST, EST) also in addition to the date. Is it possible to modify the sys_contentstartdate so that it can fulfill these requirements or otherwise how a new such field may be created?
Thank you
Shruti,
Any object that begins with the prefix “sys_” is a system object that will be overwritten on upgrade. Therefore, modifying a system object is not recommended practice.
Looking at the sys_contentstartdate field definition in the Percussion Workbench, it already has a data type of datetime, which means users can already enter time values as well as date values. (Note that the default calendar control does not include time; users can enter the time by hand, though.)
Time zone is trickier. While the Java SimpleDateFormat supports time zone, the data types available in your database may not. Check the data types definition for your RDBMS to confirm whether the date and time data types support time zone.
RLJII
Hi,
Is there a way that we can change the current calendar control so that it may have the provision for accepting date and the time zone. Or can we create an all new calendar control and incorporate these facilities in that?
Any clues and hints will be greatly appreciated.
Thank you
Hi Rljohnson,
The start date in my RDBMS (which is Oracle) is of date format, it does not take time or time zone. Do you have any other suggestions please?
Thank you,
-Shruti
The calendar control is not configurable in that way.
Yes, you can create a new control. See the “Content Editor Control Reference”, p. 38 in the [I]Technical Reference[/I] (Version 6.7 link) for details.
I’m pretty sure PSO has implemented modifications of the calendar control for other customers. You might want to contact PSO for details.
RLJII
Sounds like the implementation you want would require a new Content Type field, possibly two.
Check the Oracle documentation to see what other datatypes are available that might support your needs. I’d be surprised if Oracle did not have a datatype that includes time as well as date. (MS SQL Server certainly more than one datatype like this.) When you create your new field, use one of these datatypes.
Time zone is a different matter. You might need to add time zone as an additional field.
RLJII
Just in case this thread may influence someone’s choice of Oracle for their implementation…
The Oracle DATE data type stores DATE in 7 bytes. Each byte in it stores values for an element of the DATE as follows:
Byte Description
1 Century value but before storing it add 100 to it
2 Year and 100 is added to it before storing
3 Month
4 Day of the month
5 Hours but add 1 before storing it
6 Minutes but add 1 before storing it
7 Seconds but add 1 before storing it
Thus, date AND time are stored in a column of type DATE in oracle.
However, I concur TZ support is not included. If you need that kind of functionality, create a shared field of type “TIMESTAMP WITH TIME ZONE.”
This might be useful to you: http://www.dbasupport.com/oracle/ora9i/TimeZone.shtml