calculation date display

Comments

6 comments

  • Hamid

    Hi Jakob,

    To format date use moment() : doc at https://momentjs.com/docs/#/displaying/

    var date = moment(@Mødedato).format("MMM DD YYYY")
    @Infodag + ", " + date + ", " + @Infodag fokus
    0
    Comment actions Permalink
  • Jakob Rosenfeldt

    thanks Hamid. 

     

    what am I doing wrong? 

    0
    Comment actions Permalink
  • Hamid

    In the seconde line replace @Mødedato by date

    like this:

    @Infodag by + ", " + date + ", " + @Infodag fokus
    0
    Comment actions Permalink
  • Jakob Rosenfeldt

    Could you help me out again? 

    For some reason it subtracts one day. 

    In the calendar input is 28th of May and in the visible part it's 27th. 

    How come? 

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hello Jakob,

    add your timezone (the same as in your Podio Account settings). My timezone eg is Europe/Berlin.

    var date = moment(@Mødedato).tz("Europe/Berlin").format("MMM DD YYYY");
    0
    Comment actions Permalink
  • Jakob Rosenfeldt

    thanks Rainer. 

    I think you've put in an answer in every post I've made here. You're brilliant. 

    Altering the hour of the event also caused the thing to change the date. 

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk