- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Getting an error while using Cast function
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2004 11:10 PM
тАО11-08-2004 11:10 PM
declare :p_date date vms;
begin
set :p_char = '31-AUG-2003 00:00:00.00';
set :p_date = cast(:p_char as date vms);
cont> end;
%RDB-E-CONVERT_ERROR, invalid or unsupported data conversion
-COSI-F-IVTIME, invalid date or time
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2004 11:18 PM
тАО11-08-2004 11:18 PM
Re: Getting an error while using Cast function
31-AUG-2003:00:00:00.00
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2004 11:23 PM
тАО11-08-2004 11:23 PM
Re: Getting an error while using Cast function
It stiil gives the same error.
I am not sure that the way i am using CAST function is correct.
See the error below(after putting COLON):
declare :p_char char(23);
declare :p_date date vms;
begin
set :p_char = '31-AUG-2003:00:00:00.00';
set :p_date = cast(:p_char as date vms);
end;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2004 11:25 PM
тАО11-08-2004 11:25 PM
Re: Getting an error while using Cast function
SQL> declare :p_char char(23);
SQL>
SQL> declare :p_date date vms;
SQL>
SQL> begin
cont>
cont> set :p_char = '31-AUG-2003:00:00:00.00';
cont>
cont> set :p_date = cast(:p_char as date vms);
cont>
cont> end;
%RDB-E-CONVERT_ERROR, invalid or unsupported data conversion
-COSI-F-IVTIME, invalid date or time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2004 11:53 PM
тАО11-08-2004 11:53 PM
Re: Getting an error while using Cast function
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2004 12:11 AM
тАО11-09-2004 12:11 AM
Re: Getting an error while using Cast function
It gives error in both cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2004 12:13 AM
тАО11-09-2004 12:13 AM
Re: Getting an error while using Cast function
Its not preciser than seconds. Remove ".00".
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2004 12:17 AM
тАО11-09-2004 12:17 AM
Re: Getting an error while using Cast function
SQL> declare :p_date date vms;
SQL> begin
cont> set :p_date='31-AUG-2003';
cont> end;
SQL> print :p_date;
P_DATE
31-AUG-2003 00:00:00.00
SQL>
Greetz,
Kris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2004 12:20 AM
тАО11-09-2004 12:20 AM
Re: Getting an error while using Cast function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2004 12:23 AM
тАО11-09-2004 12:23 AM
Re: Getting an error while using Cast function
My objective is to convert String to date.