Board index » delphi » getting only date from datetime

getting only date from datetime

hi,

I have a paradox table with a field "date" with datatype "datetime".
so the values stored in it are like "02.10.1975 19:33:00". Can I
somehow get only the date-value ("02.10.1975") by an SQL-Select-
Statement like

  SELECT OnlyDate (Date) FROM ... ?

thx a lot
carsten willems

 

Re:getting only date from datetime


Quote
> I have a paradox table with a field "date" with datatype "datetime".
> so the values stored in it are like "02.10.1975 19:33:00". Can I
> somehow get only the date-value ("02.10.1975") by an SQL-Select-
> Statement like [snipped]

Try something like this:

SELECT CAST(DateTimeField AS DATE) as JustDate FROM "test.db"

Hope this helps...
--
Vinnie Murdico
Software with Brains, Inc.
SWBTracker - Value-Priced Defect Management Software
http://www.softwarewithbrains.com

Re:getting only date from datetime


it works, thanks a lot,
carsten willems

Other Threads