Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL server datetime field
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00745071
Message ID:
00745079
Views:
20
I think this will give you the order you want:

CONVERT(varchar, datetimefld, 112)

While this gives the formatting:

CONVERT(varchar, datetimefld, 107)


>On a datetime field I need to get only the date, not the time.
>
>I've tried LEFT(CAST(datetimefld AS CHAR),11) but it gives me, of course, a char field that I cannot sort by correctly.
>How can I get this as a DATE ?
>Jan 11 2003 looks nice for what I want, but again, I cannot order it in this way
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform