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.
| Author |
Topic |
|
Tobisha
Starting Member
3 Posts |
Posted - 2011-09-07 : 06:01:35
|
| Hello, i need help in my sql.Sorry my language but im from Portugal.This is problem:I have a mysql database.I need to update table tbl_registos where i have an column where name is datainicio but datainicio is a datetime... Format = 'yyyy/mm/dd hh/mm/ss';Example:UPDATE tbl_registosSET datafim = getdate()WHERE datainicio = '2010/10/10';The problem is datainicio is a datetime, contains a time, i need to convert...Any solution?Regards |
|
|
karthik_padbanaban
Constraint Violating Yak Guru
263 Posts |
Posted - 2011-09-07 : 06:08:25
|
| are you using SQLserver.?Karthikhttp://karthik4identity.blogspot.com/ |
 |
|
|
Tobisha
Starting Member
3 Posts |
Posted - 2011-09-07 : 06:14:45
|
| Hum, I think yes...Im using application in c# and use reference data.mysql..Thanks |
 |
|
|
Tobisha
Starting Member
3 Posts |
Posted - 2011-09-07 : 10:55:30
|
| Any Solutions/ideas?!?I need help |
 |
|
|
SergioM
Posting Yak Master
170 Posts |
Posted - 2011-09-07 : 23:28:00
|
| I went to http://www.google.com & I typed 'convert sql datetime to date only'. The first result seems to answer your question perfectly and in detail. http://blog.sqlauthority.com/2007/06/10/sql-server-retrieve-select-only-date-part-from-datetime-best-practice/ |
 |
|
|
|
|
|