Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to extract time from now() function

Author  Topic 

nicolanicola
Starting Member

1 Post

Posted - 2010-04-08 : 21:15:18
I am extremely new to this, so please bear with me if I don't make sense.

In a php script, I add a datestamp to a field by using the now() function.

I am retrieving this field now from db, I have successfuly managed to get the date and convert it - select DATE_FORMAT(date,'%d-%m-%Y') as postedDate.

But I can't get the time at all. Can someone please help? I've tried using convert but I think I'm doing it wrong,

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-04-08 : 21:19:57
your question is PHP related. Please post over at PHP forum. This is specifically for SQL Server


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-04-09 : 02:20:10
now() will have time part too

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -