Dates in SQL

Results 1 to 2 of 2

Thread: Dates in SQL

  1. #1
    Join Date
    Dec 1969

    Default Dates in SQL

    select time as Time, total as Total from cnc_live..cnc_user_session WITH (nolock) where time&#062;&#039;6/26/02&#039; order by time desc<BR><BR>In the query above I need to return data for today instead of typing in todays date.

  2. #2
    Join Date
    Dec 1969

    Default try this

    Try This<BR><BR>SELECT Today=convert(varchar, GETDATE(), 101)<BR><BR><BR>Today <BR>------------------------------ <BR>07/31/2000<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts