Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: how to get the date in the database?


Message #1 by blueatmosphere@y... on Wed, 9 Oct 2002 03:27:55
how do iget the date in the database?

  response.write(strDate & "/" & strMonth & "/" & strYear & "<br/>")

strInsertSQL = " INSERT INTO Customer (#"&strDate&strMonth&strYear&"#)

thanks~~~~~~~~~~~~~
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 9 Oct 2002 13:10:42 +1000
<%
dteToday = Year(Date()) & "/" & Month(Date()) & "/" & Day(Date())

strSQL = _
    "INSERT INTO Table1 (MyDateField) VALUES #" & dteDate & "#"

Response.Write(strSQL)
%>

www.adopenstatic.com/faq/dateswithaccess.asp

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <blueatmosphere@y...>
Subject: [asp_databases] how to get the date in the database?


: how do iget the date in the database?
: 
:   response.write(strDate & "/" & strMonth & "/" & strYear & "<br/>")
: 
: strInsertSQL = " INSERT INTO Customer (#"&strDate&strMonth&strYear&"#)
: 
: thanks~~~~~~~~~~~~~

Message #3 by Greg Griffiths <greg2@s...> on Wed, 09 Oct 2002 15:14:32 +0100
Date functions such as to_date and to_char - in Oracle - and their 
equiverlants will help you, you may also be able to use something like sysdate.

At 03:27 09/10/02 +0000, you wrote:
>how do iget the date in the database?
>
>   response.write(strDate & "/" & strMonth & "/" & strYear & "<br/>")
>
>strInsertSQL = " INSERT INTO Customer (#"&strDate&strMonth&strYear&"#)
>
>thanks~~~~~~~~~~~~~


Message #4 by "Samir Chitkara , Gurgaon" <chitkaras@g...> on Thu, 31 Oct 2002 18:15:11 +0530
hi!

pick date from the database

in oracel uses sysdate 
in sql use getdate()
in ur query

samir



-----Original Message-----
From: blueatmosphere@y... [mailto:blueatmosphere@y...]
Sent: Wednesday, October 09, 2002 8:58 AM
To: ASP Databases
Subject: [asp_databases] how to get the date in the database?


how do iget the date in the database?

  response.write(strDate & "/" & strMonth & "/" & strYear & "<br/>")

strInsertSQL = " INSERT INTO Customer (#"&strDate&strMonth&strYear&"#)

thanks~~~~~~~~~~~~~

  Return to Index