Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba


Go to End

2 Posts   1778 Views


Community Member, 1 Post

11 August 2010 at 11:11pm

I want to get the current time from the admin panel whenever a new page is added to a pagetype to store in the database.
Now am using SS_Datetime .And i tried time date also.It s not using to get the current time from user.
public static $db = array(

"Date" =>"SS_Datetime"
This is my code and when i am using this the data type of the date is storing as "Datetime" format.But i need to change the datatype as Timestamp (which is in mysql !). How can i do this. If anyone help for this it would be appreciated ...Thanks in advance !!


Community Member, 114 Posts

18 August 2010 at 4:40am

I don't think you can do that in SS per se, but you could write a sql query to get the timestamp out that way.