cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

Adding Seconds to TimeStamp

dwilliams
12-Amethyst

Adding Seconds to TimeStamp

Hello Gurus,
Through query builder, I am trying to add 10 seconds to a timestamp. I have attempted this with the query below but the results are not correct. Can anyone tell me what I am doing wrong?

[cid:image001.png@01CAB47E.375ED040]

Thanks for your help,
Dax Williams
Business Administrator, Windchill
Lifetime Products, Inc.
-<">mailto:->

[Lifetime_Logo_BlkWhite_Sans_email sig]

6 REPLIES 6

We've had all kinds of strange results using To Character - seems to swap things from local to GMT time.

Just display the time before manipulating.
jessh
12-Amethyst
(To:dwilliams)

All times are stored in the database in GMT. Moreover all method
servers run in GMT, not the local time zone.

Thus in cases where no time zone is otherwise specified it is
unsurprising when the results are in GMT.

On 2/23/2010 2:49 PM, Lockwood,Mike,IRVINE,R&D wrote:
> We've had all kinds of strange results using To Character - seems to
> swap things from local to GMT time.
> Just display the time before manipulating.
>

Good to know. I've been experimenting quite a lot lately trying to determine how to ensure that query builder reports show the same as details pages.

Any more info on how these behave?
- To Character
- Round
- Truncate
- Time Difference (days)

thank you
jessh
12-Amethyst
(To:dwilliams)

I don't have any further detailed information on these functions, but
will forward this to someone who might.

On 2/23/2010 6:42 PM, Lockwood,Mike,IRVINE,R&D wrote:
> Good to know. I've been experimenting quite a lot lately trying to
> determine how to ensure that query builder reports show the same as
> details pages.
> Any more info on how these behave?
> - To Character
> - Round
> - Truncate
> - Time Difference (days)
> thank you
>

Mike and Jess,
Thanks for your replies.

Unfortunately, I am still looking for the answer. In the report screenshot, I was just trying to display the value. My goal however is to use this manipulated value in the criteria similar to below.

If (Drawing.lastUpdated + 10 Seconds) < CAD.lastUpdated then include row.

I appreciate any help you can provide.

Dax Williams
Business Administrator, Windchill
Lifetime Products, Inc.
-<">mailto:->

[Lifetime_Logo_BlkWhite_Sans_email sig]

From: Lockwood,Mike,IRVINE,R&D [


Dax,

In a criterion, you can just compute the datediff between the two fields, and compare the result with your target value. I works for me, However my time differences are in days, not in seconds.

I dont thinkplain arithmeticfunctions work with timestamps. You have to use the ones which were designed for date/time values.

HTH,

Vincent


In Reply to Dax Williams:

Mike and Jess,
Thanks for your replies.

Unfortunately, I am still looking for the answer. In the report screenshot, I was just trying to display the value. My goal however is to use this manipulated value in the criteria similar to below.

If (Drawing.lastUpdated + 10 Seconds) < CAD.lastUpdated then include row.

I appreciate any help you can provide.

Dax Williams
Business Administrator, Windchill
Lifetime Products, Inc.
-<

[Lifetime_Logo_BlkWhite_Sans_email sig]

From: Lockwood,Mike,IRVINE,R&D [mailto:Mike.Lockwood@AlconLabs.com]
Announcements

Top Tags