Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    2

    Unanswered: 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.

  2. #2
    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

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Hi, are you using ABF ?

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •