[thelist] SQL/Access

Daniel S. O'Shea doshea at surfree.com
Mon May 14 21:51:37 CDT 2001

I'm moving from Frontpage to SQL and still working locally on my machine.
After importing an Excel file into Access, the SQL query return from the
access database is giving me the full string on the date/time fields.
Example: 9/9/2001 for date and for time, 1:00:00 PM.
Is there a way I can get just 9/9 returned and 1:00 PM? I tried to change it
in Access but no matter how I change the field properties, I still get the
full string.

Everything else works great, would just like to get rid of the year and the

Dan O.

Here is part of my code:

sql = "SELECT nflsched.week, " & _
      "nflsched.date, " & _
      "nflsched.team, " & _
      "nflsched.site, " & _
      "nflsched.opponent, " & _
      "nflsched.time, " & _
      "nflsched.day " & _
"FROM nflsched " & _
"WHERE nflsched.site='at' AND nflsched.week='Week 01' " & _
"ORDER BY nflsched.week, nflsched.date, nflsched.time;"

Set rsSched = Server.CreateObject("ADODB.Recordset")
rsSched.Open sql, cnn1, adOpenStatic, adLockReadOnly, adCmdText

varweek = rsSched("week").value
....html code....

  <td width=120 bgcolor="#F2F2F2"><SPAN

  <td width=80 bgcolor="#F2F2F2"><SPAN
  <td width=20 bgcolor="#F2F2F2"><SPAN
  <td width=90 bgcolor="#F2F2F2"><SPAN
  <td width=70 bgcolor="#F2F2F2" align="center"><SPAN

More information about the thelist mailing list