I have adopted a SQL server 7.0 database that contains fields of type 'DateTime'. Some of these fields are used solely for the storing of 'Date' entries and similarly some for 'Time' entries. Obviously with the data-type being 'DateTime' these fields have both a 'Date' and a 'Time' element.
How do I extract just the 'Date' (or the 'Time') element from these fields as required ?
I'm thinking its possible (maybe through CAST'ing and such) but can't seem to see it straight off.
Can anyone suggest how I can do this ?
I can do this through a delphi front-end (by reading the 'DateTime' as a String and taking the appropriate substring of this) but ideally want to obtain the information directly through the database query.
Thanks in advance.
Steve
How do I extract just the 'Date' (or the 'Time') element from these fields as required ?
I'm thinking its possible (maybe through CAST'ing and such) but can't seem to see it straight off.
Can anyone suggest how I can do this ?
I can do this through a delphi front-end (by reading the 'DateTime' as a String and taking the appropriate substring of this) but ideally want to obtain the information directly through the database query.
Thanks in advance.
Steve