Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Maintain: Best practices timestamp data type

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Maintain: Best practices timestamp data type
 Login/Join
 
Gold member
posted
I have a maintain application that connects to an MS-SQL database. The user has requested that a timestamp be added to certain records when they are inserted or updated. I'd like to see what other developers are using to generate timestamps, and what data type they are using on the back end. I could use things like the today2() function, but wouldn't this result in an alpha type field? I want to use something that could make reporting simpler in the future, and would allow me to make use of the many reporting functions for times and dates.

I've searched for documentation on this but all I can find is info referring to reporting off of timestamps or converting, but nothing about generating them. Any advice to point me in the right direction would be appreciated.

This message has been edited. Last edited by: Kerry,


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Expert
posted Hide Post
Would it be easier to set up a trigger on the table to add in the timestamp ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Yeah, I'm not sure why I didn't explore that first. Thanks!


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Virtuoso
posted Hide Post
And if that is not an option, you could just use the HGETC function to populate a date-time field with the current date and time and then store it in the database.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
I prefer HGETC every time. It is not DB specific, and leaves me in control.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Maintain: Best practices timestamp data type

Copyright © 1996-2020 Information Builders