Wrox Programmer Forums
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 25th, 2004, 05:22 AM
Authorized User
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL2000 and inserting Date value

I am having problem with inserting the date into the database.
if I force the date to show on the page as mm/dd/yy it will update as dd/mm/yy
but i need to show it on the page as the way is updating dd/mm/yy.
any ideeas?

 MM_fieldsStr = "P_Name|value|P_Description|value|supplier|value|s upplier_p_id|value|supplierlogo|value|freeshipping |value|P_Price|value|textfield|value|P_SmallPictur e|value|P_LgPicture|value|P_Discontinued|value|P_O nSpecial|value|P_OnSpecialPrice|value|startdate|va lue|enddate|value|Promo|value|Promo_Start|value|Pr omo_End|value|CategoryID|value|P_Rated|value"
  MM_columnsStr = "P_Name|',none,''|P_Description|',none,''|Supplier ID|',none,''|Supplier_P_ID|',none,''|SupplierLogo| ',none,''|P_FreeShipping|none,1,0|P_Price|none,non e,NULL|P_Weight|',none,''|P_SmallPicture|',none,'' |P_LgPicture|',none,''|P_Discontinued|none,1,0|P_O nSpecial|none,1,0|P_OnSpecialPrice|none,none,NULL| P_DateStart|',none,''|P_DateEnd|',none,''|Promo|no ne,1,0|Promo_Start|',none,''|Promo_End|',none,''|C ategoryID|none,none,NULL|P_Rated|',none,''"
Old November 26th, 2004, 12:22 PM
Authorized User
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts

I am after finding a way. Thanks guys.

code bellow for anybody that runs into the same problem:

Dim TmpDate
TmpDate = Split(MM_fields(27),"/")
MM_fields(27) = TmpDate(1) & "/" & TmpDate(0) & "/" & TmpDate(2)
TmpDate = Split(MM_fields(29),"/")
MM_fields(29) = TmpDate(1) & "/" & TmpDate(0) & "/" & TmpDate(2)
TmpDate = Split(MM_fields(33),"/")
MM_fields(33) = TmpDate(1) & "/" & TmpDate(0) & "/" & TmpDate(2)
TmpDate = Split(MM_fields(35),"/")
MM_fields(35) = TmpDate(1) & "/" & TmpDate(0) & "/" & TmpDate(2)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Date in Sql Server lamdog ASP.NET 1.0 and 1.1 Basics 5 March 18th, 2005 01:05 PM
Inserting/updating with empty date field takabyte Classic ASP Databases 3 December 23rd, 2004 02:14 PM
Need help inserting a date jrwlkn Classic ASP Basics 2 February 23rd, 2004 02:38 AM
Date Time Mayhem in SQL2000 dfalconer SQL Server ASP 0 February 9th, 2004 06:57 AM
SQL2000 Date/Time field update Lucian Ion Dreamweaver (all versions) 9 January 2nd, 2004 09:14 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.