#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Posts
    12
    Rep Power
    0

    Day number for year


    Hi,
    I use extract day command from firebird but it return MONTH of day numbe 1-30.
    I need day number for year 1-365.
    for example 1 February should be 32. day for year.
    if i use extract DAY it return 1
    is there any command for this in firebird?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,787
    Rep Power
    349
    Please show us exactly how the SQL looks like that you are using
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Posts
    12
    Rep Power
    0
    Code:
    SELECT
        VWKASA_CINS,
        VWKASA_TUR,
        sum((VWKASA_TUTAR * VWKASA_carpan)),
        VWKASA_PARABIRIMI,
        sum(VWKASA_TLTUTAR * VWKASA_carpan),
        extract(DAY from VWKASA_KAYITTARIHI)
    FROM
    VWKASA
    WHERE
    .....
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,787
    Rep Power
    349
    According to the manual:

    http://www.firebirdsql.org/refdocs/langrefupd15-extract.html

    you are looking for YEARDAY
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Posts
    12
    Rep Power
    0
    yes. thanks

IMN logo majestic logo threadwatch logo seochat tools logo