I'm hoping someone here can help me out because I am incredibly stuck on an issue in Crystal. I'm currently trying to take a string similar to the following "15:39:40" and change it into a time or numeric format so I can do some calculations on it. Unfortunatly every attempted to convert this using functions like Mid to seperate only the numbers then ToNumber to do the numeric conversion has met with total failure. I'm not new to coding but I am at this point very very lost as to how crystal wants to allow you to convert this data can anyone explain to me how in the heck to do this?Why not fetch the data as a string from you database using a to_char function and then use mid etc. for editing. If you use CR 10 or newer you can create SQL functions from Crystal Reports
- Jukka|||Hi,
I'm new to Crystal Reports 10, but not to SQL and I'm having an issue. I can't use SQL to create a stored procedure to be run by Crystal, so I'm having to go to the database directly from Crystal.
I have a date field that is really an integer: 20070612. I need to convert this field to be 06-12-2007 in Crystal. I have no way of doing so and do not even know where to begin.
The date will then be used to compare to today's date to determine if the record is returned or not.
Anyone have any thoughts?
Thanks!|||try out this
local Stringvar x:=cstr({tabla.dato},"###");
mid(x,5,2) + "-" + mid(x,7,2) + "-" + mid(x,1,4)|||What's wrong with the simple, obvious way? e.g.
stringvar x := "15:39:40";
ctime(x)
or what are you not telling us when you wrote 'take a string SIMILAR to'?|||What's wrong with the simple, obvious way? e.g.
stringvar x := "15:39:40";
ctime(x)
or what are you not telling us when you wrote 'take a string SIMILAR to'?
sorry :)
I have a date field that is really an integer: 20070612. I need to convert this field to be 06-12-2007 in Crystal. I have no way of doing so and do not even know where to begin.
local Stringvar x:=cstr({tabla.dato},"###");
mid(x,5,2) + "-" + mid(x,7,2) + "-" + mid(x,1,4)|||If its a string while fetching it from database you can convert it to datetime.|||Hensa, I was answering the thread's original question, not Bentley's one.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment