If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to Change the Varchar2 Data type to date for a data item.

Started by S_N_Solution, 05 Jun 2008 02:49:28 AM

Previous topic - Next topic

S_N_Solution

I have two columns in report having varchar2 data type(Date enter as Varchar2).Now i want to subtract those columns and want to show the duration between those time.But because data is entered as Varchar2,i am not able to calculate this value.Please suggest me how should i get the difference between those columns.

blom0344

With the proper format you should be able to use a simple cast to convert to date:


cast([dateasvarchar],date)


jahnavi

use cast function it will convert the datatypes in the report.Syantax is

cast(Expression,datatype_conversion)

blom0344

Quote from: jahnavi on 11 Jun 2008 06:44:20 AM
use cast function it will convert the datatypes in the report

Please take note of earlier replies. You are just echoing my response.
Add or correct it instead of repeating it's contents..