473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date conversion problem

11 New Member
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 2725
amitpatel66
2,367 Recognized Expert Top Contributor
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 New Member
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
32432
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 query to format the date returned as a timestamp without having to do the conversion in php. Can someone tell me what to put in my db query?
3
3743
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 function 1) parsedate function failed if a date string like below format "16-MAY-2005 01:26" 2)parsedate_tz function also failed if a date string
5
16093
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 this to Hijri to gregorian it either do nothing or go to next record on form. well there r two fields on form that r calc afterevents each other dates. ur assistance will be highly appreciated, if any one can tell what is wrong with this codes
1
3606
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 it works. I never get errors, and if I don't try to update the date fields, I always update the expected number of rows (1). When I do date conversion using the same conversion function, then call CRowset::Add() to add a record to the same table,...
5
8649
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 when the date state is not valid. But we may need to pass NULL dates (read from a database) to our COM clients! - Yes, this problem doesn't occur in Release version, but we can't have a Debug version that asserts from time to time :) A solution...
29
9140
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 example is: 36,525 represents 01/01/1900. The starting point date is considered to be : 00/00/0000. I have looked thru Help and used Google and have not really found an answer. I know that Leap Years need to be accounted for too. Any...
10
1681
by: melissa.nava | last post by:
Here is my code: ***** Public Property DOB() As Date Get Try DOB = (msBirthMonth + "/" + msBirthDay + "/" + msBirthYear)
1
5944
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 address varchar phoneno int date varchar i want the record of students between 1-1-2006 and 1-2-2006 as my field name type of date is varchar i...
44
10243
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
5156
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 doesn't generate any error, this is what I am doing: --------------------------- Dim strSDate As String Dim strSTime As String Dim strStartDT As String Dim strSDateTime As String
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.