473,378 Members | 1,389 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,378 software developers and data experts.

Date conversion problem

11
Dear All,

Help me!

From application i am sending date parameter to report which is in 'DD-MON-RRRR' format...

In a table i have a column TRX_DATE in want to compare this column with Form date parameter

when i check report argument its something like this
Expand|Select|Wrap|Line Numbers
  1.  
  2. p_ca_set_of_books_id='1'
  3. P_SET_OF_BOOKS_ID='1'
  4. P_ORDER_BY='Customer'
  5. P_CUSTOMER_NUMBER_LOW='1001'
  6. P_CUSTOMER_NUMBER_HIGH='1005'
  7. P_START_DATE='2001/01/01 00:00:00'
  8. P_END_DATE='2005/01/01 00:00:00'
  9.  
  10. Receiving an error while running the report.
  11.  
  12. ERR REP-1401: 'afterpform': Fatal PL/SQL error occurred.
  13. ORA-01861: literal does not match format string
  14.  
  15. if :p_start_Date is NOT NULL then 
  16. :lp_start_date := TO_CHAR(to_date(:p_start_date),'DD-MON-RRRR');
  17. end if ;
  18.  
  19. if :p_end_date is NOT NULL then 
  20.     :lp_start_date := TO_CHAR(to_date(:p_end_date),'DD-MON-RRRR');
  21. end if ;
  22.  
please help me how do i compare my arguments with table column...

regards,
moyoal
Apr 3 '08 #1
2 2696
amitpatel66
2,367 Expert 2GB
You need to try something like this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. if :p_start_Date is NOT NULL then 
  3. :lp_start_date := TO_CHAR(to_date(:p_start_date),'RRRR/MM/DD HH24:MI:SS');
  4. end if ;
  5.  
  6. if :p_end_date is NOT NULL then 
  7.     :lp_start_date := TO_CHAR(to_date(:p_end_date),'RRRR/MM/DD HH24:MI:SS');
  8. end if ;
  9.  
  10.  
Apr 3 '08 #2
moyoal
11
thanks for your reply amit....
i will try will back to you
regards

You need to try something like this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. if :p_start_Date is NOT NULL then 
  3. :lp_start_date := TO_CHAR(to_date(:p_start_date),'RRRR/MM/DD HH24:MI:SS');
  4. end if ;
  5.  
  6. if :p_end_date is NOT NULL then 
  7.     :lp_start_date := TO_CHAR(to_date(:p_end_date),'RRRR/MM/DD HH24:MI:SS');
  8. end if ;
  9.  
  10.  
Apr 3 '08 #3

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

Similar topics

2
by: Ben | last post by:
I would like to use php to query a database and retrieve a unix timestamp. The problem is that mysql is storing the data in the date format and not a timestamp. I am sure that I can amend my...
3
by: praba kar | last post by:
Dear All, I have doubt regarding date string to time conversion function. In Python I cannot find flexible date string conversion function like php strtotime. I try to use following type...
5
by: SalimShahzad | last post by:
Dear Respected Gurus, I need a coding assistant converting from gregorian to hijri and vice versa. I have problem with this codes. the problem Gregorian to Hijri gives 100% results. when i enter...
1
by: Riley DeWiley | last post by:
I have an UPDATE query that is always setting 0 records. When I cut and paste the SQL into Access and use it, it fails in the same way unless I coerce the date fields to be '=now()', in which case...
5
by: Paolo | last post by:
We are experiencing a problem with COleDateTime while migrating our MFC&ATL project from VC++6.0 to VC++7.1 (Visual Studio .NET 2003). COleDateTime has a DATE conversion operator that in 7.1 asserts...
29
by: james | last post by:
I have a problem that at first glance seems not that hard to figure out. But, so far, the answer has escaped me. I have an old database file that has the date(s) stored in it as number of days. An...
10
by: melissa.nava | last post by:
Here is my code: ***** Public Property DOB() As Date Get Try DOB = (msBirthMonth + "/" + msBirthDay + "/" + msBirthYear)
1
by: itfgnanvigneshwari | last post by:
hai, as i am new to php field i had a problem in date field. i have table named student with fields fieldname type name varchar...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
2
by: RN1 | last post by:
A TextBox displays the current date (in dd/mm/yyyy format) & time when a user comes to a page (e.g. 15/10/2008 1:36:39 PM). To convert the date into international format so that the remote server...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.