473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

date format picture ends before converting entire input string 01830 in asp.net

The date format picture ends before converting entire input string 01830 in asp.net

Expand|Select|Wrap|Line Numbers
  1. SELECT A,B,C FROM XYZ 
  2. WHERE to_date(accptnc_dttm,'DD-MON-RRRR HH:MM')>='" + datefrom_changed + "' and to_date(accptnc_dttm,'DD-MON-RRRR HH:MM')<'" + dateto_changed + "'
Jul 9 '13 #1
2 1345
Frinavale
9,735 Expert Mod 8TB
Is "01830" a date then?
Is that 1901? 2001?

I think your date string is incorrect and that it isn't being converted properly but it is really hard to tell because you have just posted a code snippet used for selecting some data from the database.
Jul 9 '13 #2
Killer42
8,435 Expert 8TB
Ok, I don't know ASP at all, so take all this with a grain of salt. It may all just be down to variation between flavours of SQL. That being said...
  • Wouldn't it be more efficient to use the BETWEEN clause, so you only execute the to_date() function half as many times?
  • In the SQL I'm familiar with, date constants are delimited by # not '.
  • Both opening and closing double-quote characters appear to be missing here, so perhaps we're not seeing the whole picture?
In any case, I think we need more context to understand what's going on here.
Jul 10 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Alistair | last post by:
it's the idiot with his query strings again...."yippeee" I hear aaron shout this time the problem is with a date format query I have a query string thus strSQL = "SELECT * FROM users where...
3
by: Stefan van Roosmalen | last post by:
Hi there, I have developed several applications in Delphi. I used Paradox for my data storage. Now, I want to convert these databases to MySql. So that why I am looking for a way to convert the...
15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
2
by: Jim | last post by:
im using asp.net, C# to enter data into a table in sql server...however im getting this error: Input string was not in a correct format. Description: An unhandled exception occurred during the...
0
by: Wayne Aprato | last post by:
My computer is using the dd/mm/yyyy date format. Is there a simple input mask for a date field that will accept just the month and year eg. 08/04 and maybe default the day to 01? I presume that...
2
by: Brian Candy | last post by:
I am guessing that this must be a common question, but I just can't find a simple solution for it by searching the newsgroups. I have a Text Box with a date in a UK format. The format has been...
5
by: blackg | last post by:
Input string not in correct format -------------------------------------------------------------------------------- I am trying to view a picture from a table. I am getting this error Input string...
1
by: amitbadgi | last post by:
I am gettign this error, while migration an app to asp.net Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 19: Dim enddate =...
5
by: rohdej | last post by:
Hello - I have been all over the web and found a few posts that are somewhat related to what I'm trying to do, but none that provided me a concise answer. I want to prompt the user to input the...
9
chandru8
by: chandru8 | last post by:
hi to all iam using vb6.0 can any one correct me the query which below mentioned is correct strSql = "Insert into table1 values (#" & Date & "# ,'2')" Set rs = objCon.Execute(strSql) or
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.