473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 25862
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.