Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi, I have a column in SQL actually, assuming the commands would be the same in Access. I have a Created Date field and its Date and Time.I have my basic querySelect * FROM DATABASE name[Column Names],[Column Names],[Column Names],[Created Date]How do I write the query to format the date as Date without the time usinga) select DATEADD(dd, DATEDIFF(dd, 0, getdate()), 0)orCAST(FLOOR(CAST(getdate() AS FLOAT)) AS DATETIME) ??
pcride
Starting Member
9 Posts
Posted - 2011-09-27 : 23:22:13
Looks like I figured it out!
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2011-09-27 : 23:25:02
you are using SQL Server 2008 or Access ?if it is SQL 2008, there are 2 ways to do it depends on what is the end data type that you want.