Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Generate date of past sundays using Calculator Step

  1. #1

    Default Generate date of past sundays using Calculator Step

    I need 15 rows as result each will be the date of sundays back from today.

    Rather than in query, can I generate it using the Generate rows and calculator steps?

  2. #2
    Join Date
    Mar 2014
    Posts
    29

    Default

    Hi,

    Generate 15 rows with the today's date then use add sequence step fallowed by generator using start at value as -1 and increment by -7.
    then in calc step use dateA+B days by passing A as todays date and B as increment value.

    Thanks,
    Bhanu

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by Bhanuchandar View Post
    Generate 15 rows with the today's date
    Nice, but don't you think you should use "first day of week" instead of "today"?
    So long, and thanks for all the fish.

  4. #4
    Join Date
    Mar 2014
    Posts
    29

    Default

    Hi,

    Yes, we can use "first day of this week" to get previous sun day.
    In that can we have to use start value as '0' and increment by "-7"


    Thanks,
    Bhanu

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by Bhanuchandar View Post
    Yes, we can use "first day of this week"
    We MUST, I'd say. You simply can't use today's date and assume it would be sunday, as you did in your first post.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  6. #6

    Default

    hi bhanu,

    i am planning to learn pentaho data integration i have basic knowledge on sql is it fine.

    regards,
    janardhan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.