Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Conversions

Status
Not open for further replies.

achaaran

Programmer
Jan 19, 2005
18
0
0
CA
Hello,

Anyone out there know how to convert a string to a date? The string would look something like this:

"2004-01-31"

Thanks!
 
Sorry...I forgot to mention I am using Impromptu 7.0
 
The Make-DateTime function will do it.

You'd actually have to write something like this:

Make-DateTime(Left(DateString,4),Substring(DateString,6,2),Right(DateString,2))

Where the name of your string is DateString.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Are you trying to change to look of the date in your report, or trying to change the value of the date from a true date to a string of your choosing. DD's help is for the later, You can easily change to appearance of a date in the report using the format option when you right-click the data in the report display.

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top