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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

SS_Datetime


Go to End


2 Posts   2041 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.