Solved

ORA 1843 not a valid month

Posted on 2009-07-14
3
1,166 Views
Last Modified: 2013-12-19
I need to format the three dates in three different ways.
I am getting not valid month error.
Can you help? Thanks! Beth
SELECT 
PACKLIST.PACKLIST_NO, 
to_date(TRANSACTION_DATE, 'dd-mm-yyyy'), 
to_date(SCHEDULED_SHIP_DATE, 'mm-dd-yyyy'), 
to_date(ACTUAL_SHIPPED_DATE, 'mm-dd-yy'),
JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED_COST
 
FROM PACKLIST, JOBCOST
 
WHERE PACKLIST.PACKLIST_NO = JOBCOST.PACKLIST_NO;

Open in new window

0
Comment
Question by:ba_trainer
  • 2
3 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 24853164
if the three columns are dates, use to_char instead of to_date


SELECT
PACKLIST.PACKLIST_NO,
to_char(TRANSACTION_DATE, 'dd-mm-yyyy'),
to_char(SCHEDULED_SHIP_DATE, 'mm-dd-yyyy'),
to_char(ACTUAL_SHIPPED_DATE, 'mm-dd-yy'),
JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED_COST
FROM PACKLIST, JOBCOST
WHERE PACKLIST.PACKLIST_NO = JOBCOST.PACKLIST_NO;
0
 

Author Closing Comment

by:ba_trainer
ID: 31603436
they are - perfect!! thanks so much! Beth
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 24853198
glad I could help
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Extract the first word (before the , ) 2 52
PL/SQL Display based on value 4 29
Oracle DBLINKS From 11g to 8i 3 35
create a nested synonym 4 26
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question