473,473 Members | 1,776 Online
Bytes | Software Development & Data Engineering Community
Create 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.nextval into :new.NURS_TIMESTAMP 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 25867
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.nextval into :new.NURS_TIMESTAMP 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_TIMESTAMP := 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.nextval into :new.NURS_TIMESTAMP 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.nextval 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_TIMESTAMP) 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***************@boatnerd.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.nextval 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_TIMESTAMP) 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
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,...
6
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...
5
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...
3
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...
1
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...
4
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...
3
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...
1
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...
16
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...
0
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...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.