Skip to main content
1-Visitor
February 23, 2010
Question

Adding Seconds to TimeStamp

  • February 23, 2010
  • 6 replies
  • 2133 views
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

22-Sapphire I
February 23, 2010
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.
12-Amethyst
February 24, 2010
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.
>
22-Sapphire I
February 24, 2010
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
12-Amethyst
February 24, 2010
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
>
dwilliams1-VisitorAuthor
1-Visitor
February 24, 2010
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 [
1-Visitor
March 5, 2010


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]