2 questions here - date and SQL format

Results 1 to 2 of 2

Thread: 2 questions here - date and SQL format

  1. #1
    Join Date
    Dec 1969
    Posts
    336

    Default 2 questions here - date and SQL format

    First off, if I store the date in an access database with the format of dd/mm/yyyy but I want to display it on my asp page in the format of January 2, 2000, is there a common vbscript command that will translate it for me?<BR><BR>Secondly, I&#039m trying to improve how I update fields in my database using the UPDATE method. I&#039ve seen examples using<BR>SQL = "UPDATE tablename SET fieldname = value". My problem is I haven&#039t seen any examples of more than one field or value and I&#039m not sure how this statement is supposed to look with more than one? And I also get confused on the quotes a lot. The only thing I can keep straight about quotes is that single quotes aren&#039t needed around a variable that is a number. If anyone could enlighten me on these issues or point me to a good tutorial, that would be great!!!! thanks!

  2. #2
    f Guest

    Default answer to one question

    here&#039s multiple fields to update!<BR><BR>SQLstmt = "UPDATE empl_Info SET OfficeExt=&#039" & form_ext & "&#039,"<BR>SQLstmt = SQLstmt & "Pin=&#039" & form_pin & "&#039,"<BR>SQLstmt = SQLstmt & "Pager=&#039" & form_pager & "&#039,"<BR>SQLstmt = SQLstmt & "Mobile=&#039" & form_mobile & "&#039,"<BR>SQLstmt = SQLstmt & "Email=&#039" & form_email & "&#039,"<BR>SQLstmt = SQLstmt & "Organization=&#039" & form_org & "&#039,"<BR>SQLstmt = SQLstmt & "EmployeeID=&#039" & form_empID & "&#039,"<BR>SQLstmt = SQLstmt & "Title=&#039" & form_title & "&#039,"<BR>SQLstmt = SQLstmt & "Function=&#039" & form_funct & "&#039,"<BR>SQLstmt = SQLstmt & "HomeNumber=&#039" & form_homeNum & "&#039,"<BR>SQLstmt = SQLstmt & "Street=&#039" & form_st & "&#039,"<BR>SQLstmt = SQLstmt & "City=&#039" & form_city & "&#039,"<BR>SQLstmt = SQLstmt & "State=&#039" & form_state & "&#039,"<BR>SQLstmt = SQLstmt & "Zip=&#039" & form_zip & "&#039,"<BR>SQLstmt = SQLstmt & "DOB=&#039" & form_dob & "&#039,"<BR>SQLstmt = SQLstmt & "ContractInfo=&#039" & form_conInfo & "&#039,"<BR>SQLstmt = SQLstmt & "ContractLoc=&#039" & form_conLoc & "&#039,"<BR>SQLstmt = SQLstmt & "ContractMngr=&#039" & form_conMngr & "&#039,"<BR>SQLstmt = SQLstmt & "ContractEndDate=&#039" & form_conED & "&#039"<BR>SQLstmt = SQLstmt & " Where LastName= &#039" & form_lname & "&#039"<BR>SQLstmt = SQLstmt & " And FirstName= &#039" & form_name & "&#039"<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
  •