how i can save date and time by php with sql server [closed]
im working in php and sql erver application i try to save date to sql server by php but it saved wrong date ex: if current date 24/4/2011 12:50 am it saved in sql server 11/9/1970 why? what i should do to save current date and time in sql server db by php language
insert into tablename set mydate=current_timestamp
my best guess
If you are saving to a datetime
or date
field use date('Y-m-d H:i:s')
精彩评论