|
 |
access_asp thread: outputting dates from SQL query in ASP using Access
Message #1 by "Rick Beley" <beley@a...> on Fri, 1 Nov 2002 18:34:39
|
|
I know this has to be easy, but my the search functions in my brain are
not working today.
I am querying an Access Database using an ASP page. one of the fields is
a date field. I want to query the date field, however, I want to be able
to pull parts of it, for example only the month and day, then sort and
group by that.
I have tried to_char, but I get an ODBC error stating it does not know
what to_char is. I can certinaly use ASP functions to convert the date,
but then my record set is not sorted as I like. I'd rather not dump the
record set in another data object to have to sort.
Can I sort this record set with some SQL commands?
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 4 Nov 2002 12:26:26 +1100
|
|
Access supports the use of VBA functions, like Month(), Year() etc
However, it is unclear from your post exactly what you wish to do, so I
can't give you more specific advice. Initially you speak about extracting
part of the date (ie "pull parts of it") which implies that you want to do
work in the SELECT clause. However, later on your speak about needing to
order the resultset correctly, which implies doing work in the WHERE or
ORDER BY clause.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Rick Beley" <beley@a...>
Subject: [access_asp] outputting dates from SQL query in ASP using Access
: I am querying an Access Database using an ASP page. one of the fields is
: a date field. I want to query the date field, however, I want to be able
: to pull parts of it, for example only the month and day, then sort and
: group by that.
:
: I have tried to_char, but I get an ODBC error stating it does not know
: what to_char is. I can certinaly use ASP functions to convert the date,
: but then my record set is not sorted as I like. I'd rather not dump the
: record set in another data object to have to sort.
:
: Can I sort this record set with some SQL commands?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |