Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 March 8th, 2009, 09:01 AM
Authorized User
 
Join Date: Feb 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Date Time Picker Problem

I am using the Date Time Picker component in development. I have 2 DTP which are the dtpStartDate and dtpEndDate respectively. The format properties of the DTP is set as SHORT.

When I fire the below SQL, I've detected the wrong output appear. Below is my SQL

strSQL = "select * from Quotation where DeliveryDate>='" & dtpStartDate.value & "' and DeliveryDate<='" & dtpEndDate.value & "'

Example of DTP input through screen
a) dtpStartDate : 03/01/2009 (format: mm/dd/yyyy)
b) dtpEndDate : 03/10/2009 (format: mm/dd/yyyy)

Sample Output consists of data from 01/03/2009 (meaning : Jan 03 3009) to 10/03/2009 (meaning : Oct 03 2009).

The SQL Server uses the default date setting during the instalaltion time.

DeliveryDate field is set as smalldatetime format.

Anyone can advise how to format the Date Time Picker component to work correctly on the output INSTEAD of changing the SQL Server date setting?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date and Time Picker snufse ASP.NET 2.0 Basics 1 March 19th, 2008 06:35 AM
Date and time picker anukagni Access 3 June 21st, 2007 12:16 AM
Date Time Picker goraya C# 1 June 4th, 2004 07:01 AM
needing help about date time picker anilkumarindiaa BOOK: Beginning Access VBA 2 January 11th, 2004 02:59 PM
Date time picker GrindBright BOOK: Beginning Access VBA 2 November 18th, 2003 05:01 PM





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