开发者

how i can save date and time by php with sql server [closed]

It's difficult to tell what is b开发者_运维技巧eing asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜