Results 1 to 4 of 4

Thread: ASP VBScript Access Database

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258

    ASP VBScript Access Database

    I have a access database on ASP VBScript.
    The actual server is in england I am in the US.
    I use a insert into SQL to add data to the database.
    I have at the start of every page Set locale 1033
    But when it saves in the datbase the date it turns around the Month and day. and when i download it it get mixed up.
    What can i do to fix it.
    Thanks

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    Its a asp hosted porvider. i do not control the server. I use fhr FormatDateTime() Function. Here is the code.
    VB Code:
    1. SetLocale 1033
    2.  
    3.           strsql = "Insert INTO Logged (AcountNum, Name, DateL, IP, RHost) Values (" & Session("AcountNum") & ", """ & Session("ComNme") & """, '" & FormatDateTime(Now, 2) & " " & FormatDateTime(Now, 4)  & "', '" & Request.ServerVariables("REMOTE_ADDR") & "', """ & RHost & """)"

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Not heard of that one before, might take a look at what that does this afternoon. In the past I've used :

    format(now(), #ddmmyyyy#)

    (been a while since I've played with that function so you might want to check that syntax a bit but that's the general idea that usually works).

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    I am working with VBScript on ASP. there is no Format(Now, "M/D/YY") Function there. Only FormatDateTime()

Posting Permissions

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



Click Here to Expand Forum to Full Width