SQL getdate()

Results 1 to 2 of 2

Thread: SQL getdate()

  1. #1
    Join Date
    Dec 1969

    Default SQL getdate()

    I have a column in SQL called simply "date" and it has the default value of "getdate()". Now that I have the date stored I would like to break it apart and view by the month and year of this column date....<BR><BR>I have NO clue how to do so... This is the SQL string I have thus far...<BR><BR>************************************ ***************<BR>strSql = "SELECT * FROM bookinginfo WHERE date= " & month & " date = " & year & " order by dte"<BR>****************************************** *********<BR><BR>Thanx in advance,<BR><BR>Keith

  2. #2
    Heaven's Martini Guest

    Default RE: SQL getdate()

    ?<BR><BR>umm, first, i wouldn&#039;t use date as a column name (issues with it being a reserved word)<BR><BR>do you mean this?<BR><BR>strSql = "SELECT * FROM bookinginfo WHERE <BR> Month(date)="& month &" <BR> AND Year(date) = "& year&" order by date"<BR><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