473,545 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get the date time from Oracle date time stamp?????

Ric
I am using crystal reports to attempt to extract information from this
database but I need to know which records were last updated. I have
managed to find a field in Oracle and its value is based on a trigger
function as shown below

begin

select TIMESTAMP_SEQ.n extval into :new.NURS_TIMES TAMP from dual;

end;

This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868

My main expertise is in SQL Server, my question is can I reverse
engineer this value to calculate the time? Or is it like an identity
field in SQL server (i.e. An automatic incremental counter)

I would really appreciate any help or pointers to some good web
sources.
Jul 19 '05 #1
3 25871
Ric wrote:
I am using crystal reports to attempt to extract information from this
database but I need to know which records were last updated. I have
managed to find a field in Oracle and its value is based on a trigger
function as shown below

begin

select TIMESTAMP_SEQ.n extval into :new.NURS_TIMES TAMP from dual;

end;

This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868

My main expertise is in SQL Server, my question is can I reverse
engineer this value to calculate the time? Or is it like an identity
field in SQL server (i.e. An automatic incremental counter)

I would really appreciate any help or pointers to some good web
sources.

Oracle dates are always WITH time!
The obvious internal pseudo column would be sysdate:

:new.NURS_TIMES TAMP := sysdate
--
Regards, Frank van Bortel

Jul 19 '05 #2
Ric wrote:

I am using crystal reports to attempt to extract information from this
database but I need to know which records were last updated. I have
managed to find a field in Oracle and its value is based on a trigger
function as shown below

begin

select TIMESTAMP_SEQ.n extval into :new.NURS_TIMES TAMP from dual;

end;

This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868

My main expertise is in SQL Server, my question is can I reverse
engineer this value to calculate the time? Or is it like an identity
field in SQL server (i.e. An automatic incremental counter)


Although this field is named Timestamp_seq, it's not really a timestamp,
it's just a sequence. Everytime you call TIMESTAMP_SEQ.n extval it gives
you the previous value plus one (look up Sequence in your docs). I
don't know how you would reverse engineer it to come up with a date/time
of the last update, but you could use it to find the most recently
updated record

Select * from mytable where NURS_TIMESTAMP =
(Select max(NURS_TIMEST AMP) from mytable)

A little more work and you can return the last n updated records.

HTH.
--
//-Walt
//
//
Jul 19 '05 #3
Hi Walt,

sorry, little correction inside.

"Walt" <wa**@boatnerd. com.invalid> wrote
news:3F******** *******@boatner d.com.invalid.. .

Although this field is named Timestamp_seq, it's not really a timestamp, it's just a sequence. Everytime you call TIMESTAMP_SEQ.n extval it gives you the previous value plus one (look up Sequence in your docs). I
If you also read this, you will see that there is
no guarantee for 'previous value plus 1'.
For many reasons...
don't know how you would reverse engineer it to come up with a date/time of the last update, but you could use it to find the most recently
updated record

Select * from mytable where NURS_TIMESTAMP =
(Select max(NURS_TIMEST AMP) from mytable)

A little more work and you can return the last n updated records.

HTH.
--
//-Walt
//
//


Greetings,
Guido
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
19590
by: Don | last post by:
Hi all, With regards to the following, how do I append the datetimestamp to the filenames in the form? The files are processed using the PHP script that follows below. Thanks in advance, Don Following running on client-side:
6
13581
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital dot org
5
2095
by: Des | last post by:
I have to do an events calender for a church. The events display will be limited to that week. If someone went in today Wed 24th I want to display 21st to 27th. I dont want any code samples, just the functions that find the day of week and a function that can (in this case) subtract 3 days to get sunday and add 7 for saterday. I can do the...
3
17560
by: phried1 | last post by:
I have created a form and inserted the following tables: Date Entered Time Entered Date Modified Time Modified Essentially how and where can I have these dates and times recorded so when the user creates a new record that date and time stamp is populating as well as if the user modifies the data, that date and time stamp is populationg. ...
1
7283
by: Susan Bricker | last post by:
Greetings. I have a report (actually all of my reports in an MDB) that I want to date/time stamp at the bottom. Previously, I had used the builtin function of Now(). I thought that would give me a date and time value in the format: "month day, year hour:minutes:seconds". However, I noticed that only the date was printing (e.g.; January...
4
6796
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form allows the employee to enter their UserID and select "Login" or "Logout" and then click a submit. When the submit button is clicked, I want the...
3
338
by: Ric | last post by:
I am using crystal reports to attempt to extract information from this database but I need to know which records were last updated. I have managed to find a field in Oracle and its value is based on a trigger function as shown below begin select TIMESTAMP_SEQ.nextval into :new.NURS_TIMESTAMP from dual; end;
1
2076
by: 6afraidbecause789 | last post by:
Hi - I am using a Date/Time Picker popup form for users to choose a a date and time for use on a separate entry form. The date/time on the entry form is actually entered automatically as a date/time stamp when a user enters a record. So, the popup form is only necessary when a user needs to change the date/time. To make this more...
16
4433
by: W. eWatson | last post by:
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after 22:02:51? (24 hour day is fine) How about the date after 02/28/04 is 02/29/04, or the date after 09/30/08 is 10/01/08?
0
7467
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7807
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5326
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.