If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Convert Julian dates in Ingres

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-04, 14:34
Sareena Sareena is offline
Registered User
 
Join Date: May 2004
Posts: 2
Convert Julian dates in Ingres

If anyone knows the Ingres syntax for converting a Julian date to a date such as mm/dd/yyyy I would appreciate it.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 05-21-04, 06:32
dbabren dbabren is offline
Registered User
 
Join Date: Jul 2003
Location: England
Posts: 152
The env variable II_DATE_FORMAT controls how dates are displayed in an Ingres DB - Have a look for that in the Ingres documentation and see if that answers your question.

I think this variable can be set for a single session, but be careful you don't change it across the entire installation (unless you want to of course)
__________________
Regards
Dbabren
Reply With Quote
  #3 (permalink)  
Old 11-02-04, 09:34
Peter76 Peter76 is offline
Registered User
 
Join Date: Nov 2004
Posts: 3
Hi, are you using ABF ?
Reply With Quote
  #4 (permalink)  
Old 11-04-04, 07:32
PaulMason PaulMason is offline
Registered User
 
Join Date: Nov 2002
Posts: 33
According to the webpage I just found, Julian dates are expressed in days since noon January 1, 4713 BC. Ingres has a couple of functions which relate to seconds since midnight Jan 1 1970 AD.

So if J is your julian date

SELECT _date((J-2440587.5)*86400), _time((J-2440587.5)*86400)

where 2440587.5 is the Julian date for 00:00 Jan 1 1970 and 86400 is secs/day

_date and _time always return the date according to GMT
__________________
Paul Mason
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On