US and Worldwide: +1 (866) 660-7555
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Date parameter default

  1. #1
    Join Date
    Nov 2010
    Posts
    29

    Default Date parameter default

    I would like to have today's date as a starting point, so I chose 'today' as property value. It seemed to work first, but when I ran the dashboard the next day, it started from the yesterday's date. How can I fix this? Thanks.

  2. #2
    Join Date
    Jul 2007
    Posts
    2,172

    Default

    In case you're using cde, there's a property that sets exactly that. It has advantages compared to using javascript to set the default date if you're on a multi timezone environment
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Nov 2010
    Posts
    29

    Default

    Quote Originally Posted by pmalves View Post
    In case you're using cde, there's a property that sets exactly that. It has advantages compared to using javascript to set the default date if you're on a multi timezone environment
    Yeah, I use CDE (some recent snapshot from github after R3). And than I run .wcdf the next day, it loads yesterday's date.

  4. #4
    Join Date
    Jul 2007
    Posts
    2,172

    Default

    Need to look into that. Is the server date in the same timezone of the client?
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  5. #5
    Join Date
    Nov 2010
    Posts
    29

    Default

    Quote Originally Posted by pmalves View Post
    Need to look into that. Is the server date in the same timezone of the client?
    Yes.

  6. #6
    Join Date
    Nov 2010
    Posts
    29

    Default

    is there a workaround I can use in the meantime? some kind of javascript, which would work only once at start time...

  7. #7
    Join Date
    Aug 2010
    Posts
    23

    Default

    erm yes.. the following javascript code will give you the date which is set on the client side computer

    Code:
    var todaysDate = currentDate();
    
    function currentDate(){
            var currentTime = new Date();
            var day = currentTime.getDate();
            var month = currentTime.getMonth()+1;
            var year = currentTime.getFullYear();
            return(year+"-"+month+"-"+day);
    }
    Google is your friend!

  8. #8
    Join Date
    Nov 2010
    Posts
    29

    Default

    Quote Originally Posted by ggy View Post
    erm yes.. the following javascript code will give you the date which is set on the client side computer
    Google is your friend!
    This is trivial. The real question was (I am guilty for not stating it clearly enough): where in this particular system do I put such code so that it sets my default date once and does not interfere with users choice of dates later.

  9. #9
    Join Date
    Nov 2010
    Posts
    29

    Default

    So how does everyone solve this problem? It must be a very common task: set up a dashboard in such a way that when you load it, dates default to the current date.

  10. #10
    Join Date
    Nov 2010
    Posts
    29

    Default

    Quote Originally Posted by pmalves View Post
    Need to look into that.
    Did you have a chance yet? Thanks.

Posting Permissions

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