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

char to date

Started by bartburg, 07 Jan 2014 03:39:08 AM

Previous topic - Next topic

bartburg

Hi,

i got a field i want to report on this field i want to do a differance between current date -2 months and the field.
the field i get from the database contains text that looks like a date "2014-01-01" but when i see its properties it says
characterLength16 so its not a date field.
how can i still perfom the function or can i query the field like a date?

BigChris

It depends on your platform etc. but I'f look at the _make_timestamp expression. You'll need to substring the data field that you've got at the moment, so you'd end up with something like:

_make_timestamp(substring([DateField],1,4), substring([DateField],6,2), substring([DateField],9,2))

There might be a more elegant solution, but that should work at least.

C

bartburg

where do i enter this  expression?