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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a date value

Status
Not open for further replies.

Maker1

Technical User
Jun 20, 2003
73
US
I am trying to translate a date stamp from KRONOS into a regular date(MM/DD/YYYY). The KRONOS stamp is 20,020,7,290,000,000.00 which is 7-29-2002. DateValue didn't work and I would like to put it into a dictionary for use in a report (I need to be able to link it to another table that has a regular date format) but can't figure out the best way to make it work. Any idea's?
 
Dictionaries aren't a good idea. Presumably you have an old version of Crystal since you're considering them. Try posting version information for better results.

The best bet is to create a View on the database which converts the date, which you could then join to other tables/views - check with your dba.

-k
 
You certainly convert your date easily enough using the DateTime function:
Code:
stringVar myDate := {table.number_date};

DateTime(Val(Left(myDate,4)),
         Val(Mid(myDate,5,2)),
         Val(Mid(myDate,7,2)),
         Val(Mid(myDate,9,2)),
         Val(Mid(myDate,11,2)),
         Val(Right(myDate,3)))

As far as using it to link to another table, if you can't do it in your database (SP or View, but I am not familiar with KRONOS), you could possibly use the formula to link to a subreport. Your subreport could retrieve the data from the table you need to link on based upon the value in the date formula.

~Brian
 
I am using CR 8.5, not familiar with the term "View" I haven't used Crystal that much. I don't have control over the databases I am just allowed to pull data from them. KRONOS is a payroll database running on an AS/400. I need to connect it to a database on our PBX switch that keeps phone data. I thought a dictionary would allow me to use the KRONOS data with the other database table.
 
Contact the AS400 dba and explain that you need a real date and ask them to create a View - if they're marginally proficient, you should have it within the hour.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top