1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to change the RM date format to DATE ?

Discussion in 'XenForo Development Discussions' started by TBDragon, Feb 28, 2014.

  1. TBDragon

    TBDragon Active Member

    hi every one
    i just wana display the date published of my resources but !!

    the resource_date field are int !! and the format of the value a number which i didnt know how to deal with or how to convert it to a date format so its displayed in normal way like in threads !!

    Fri, 28 Feb 2014 22:50:17 +0000
    but i with RM resource_date field i got this
  2. Chris D

    Chris D XenForo Developer Staff Member

    In templates, you can use:

    <xen:datetime time="$intDate" class="time" />
    Where $intDate is the time in an integer format.

    In PHP you can use:
    Again, where $intDate is the time in integer format.
    TBDragon likes this.
  3. TBDragon

    TBDragon Active Member


    i use the code but its didnt do much =(

    i put the code in a controller
    >> its FireDaemon ResourceManager Rss addon

    as the RSS format somehow r not valid as there is no pubDate tags

    so i try to play around with it and put this

    but i got this

    Use of undefined constant resource_date - assumed 'resource_date'

    $b $qs1[$i];
    $date $b[resource_date] ;
    sorry to bother u and thanks again for helping
  4. TBDragon

    TBDragon Active Member

    i fond the issue thanks
    i just forget to put ' '


    the output dosent show the same format of this

    Fri, 28 Feb 2014 22:50:17 +0000

    its show

    Friday in 21:29 << its show the day and time no month or day =(

    is there other option to format the date

    and thanks
  5. TBDragon

    TBDragon Active Member

    any help here ?!
  6. Chris D

    Chris D XenForo Developer Staff Member

    I think you can change this:
    That's from memory, I haven't tested it.
  7. TBDragon

    TBDragon Active Member

    God bless u Chris ^_^ thanks
    its work great


Share This Page