Re: How do I Convert a Date/Time Field to Just a Date Field?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: jj (jjj.nosspam_at_mindspring.com)
Date: 08/26/04


Date: Thu, 26 Aug 2004 12:47:59 GMT

Thanks to everyone for your help. Much appreciated. Also, just to
clarify, I don't mind using a time value in my "converted" date/time, so
long as the time value is 00:00:00. In fact, I assumed that would be
what it was. I just needed to change the actual hours/minutes to
"zeros", so I could just work with the "date" portion.

Again, many thanks.
jj

Tibor Karaszi wrote:
> Note that the suggestions (which are all valid) either returns a string (which is not of datetime datatype) or
> a datetime value with the time set to 00:00:00. It is impossibly to have datetime without a time value in SQL
> Server, as no such datatype exists in SQL Server. You might want to read my article at
> http://www.karaszi.com/SQLServer/info_datetime.asp which explains this more detailed and also have examples of
> how to work against datetime data, and common mistakes and misunderstandings.
>



Relevant Pages

  • Re: mm/dd/yyyy format question
    ... I was not talking about how .Net or SQL Server stores date/time values ... I get the impression that you are talking about ISO 8601 in terms ... applications use the format for unambiguously representing date/time ...
    (microsoft.public.dotnet.languages.vb)
  • RE: time criteria in query
    ... "Harry F." ... I don't have access to the actual SQL server ... in which case you'd surround your date criteria with single-quotes ... Which date/time type are you using in Sql Server? ...
    (microsoft.public.access.queries)
  • RE: time criteria in query
    ... Tried the single quotes, that didn't work. ... I don't have access to the actual SQL server ... in which case you'd surround your date criteria with single-quotes ... Which date/time type are you using in Sql Server? ...
    (microsoft.public.access.queries)
  • Re: excluding fields in SELECT statement
    ... I guess this is what Dan had in mind. ... There is a new product PromptSQL which claims to provide intellisense to ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Different results in SQL and Access
    ... Quite a discussion regarding the storage and selection of date/time ... access vs sql server. ... Access to select records from SQL via Date/Time again. ... This email account is my spam trap so I ...
    (microsoft.public.access.queries)