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, biapar, Willr, Ingo, swaiba, simon_w

SS_Datetime


Reply


2 Posts   1366 Views

Avatar
Dani

Community Member, 1 Post

11 August 2010 at 11:11pm

hai,
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 !!

Avatar
ttyl

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.