Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to get date parsed from DateTime field Post Reply Post New Topic
Author Message
jennifer_falcon
Newbie
Newbie
Avatar

Joined: 15 Jan 2009
Online Status: Offline
Posts: 35
Quote jennifer_falcon Replybullet Topic: How to get date parsed from DateTime field
     Posted: 14 Jul 2010 at 9:15am
Hi there,

In my database, I have a table called ClocksM1. The table contains four fields

TYPEPRGN:String[50]
KEY_CHAR: String[50]
NAMEPRGN: String[50]
TOTAL: DateTime


The data will look like this:

TYPEPRGN        KEY_CHAR      NAMEPRGN            TOTAL
problem           IM70195         workingtime          1/1/4000 12:31:43AM
problem           IM70195         callbacktime           1/1/4000 12:31:36AM
problem           IM70195         total.time               1/1/4000 12:31:44AM
problem           IM70195         open clock             5/30/4000 1:57:35 AM
problem           IM70195         assigntime            5/30/4000 1:57:35 AM
problem           IM70195         resolvetime           7/30/4001 1:57:35AM
problem           IM70195        Pending other        5/30/4000 1:25:52AM

(These clocks are all all related to an incident ticket called IM70195.)

When I look at the incident ticket clocks, I can see the data in the application listed as this:

TYPEPRGN        KEY_CHAR      NAMEPRGN            TOTAL
problem           IM70195         workingtime          00:31:43
problem           IM70195         callbacktime          00:31:36
problem           IM70195         total.time              00:31:44
problem           IM70195         open clock            150 01:57:35
problem           IM70195         assigntime            150 01:57:35
problem           IM70195         resolvetime           576 01:57:35
problem           IM70195        Pending other        150 01:25:52

When I put the TOTAL field into my Crystal Reports, I get 1/1/4000 12:31:43AM. When I look in the application, I get 00:31:43.

I would like to be able to change the TOTAL field to appear as a valid time.  I would like to run queries against the field.

How should I go about doing this? Should I convert the TOTAL field into seconds?

Thanks!

Jennifer




IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jul 2010 at 9:38am
for display purposes just
right click on the field
select format field
sekect the Date and Time tab
select the 13:23:45 options
For calculating it all depends on what you want to calculate.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum