Date Range Starting with 01/01 Jan01 of the same year

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg (codepug@gmail.com)

    #1

    Date Range Starting with 01/01 Jan01 of the same year

    I’m working on setting a date range for filtering that is created
    OnClick of a button.
    I want to use the current date as the EndDate and the StartDate I want
    to be the 01/01/SameYear.

    Example:

    Start 01/01/2008 End 08/13/2008

    Using the Date function to give the current date, how do I code to
    create the start date as displayed. Can it be done mathematically, is
    there a function, or does is require parsing?

    Thanks
    Greg

  • Salad

    #2
    Re: Date Range Starting with 01/01 Jan01 of the same year

    Greg (codepug@gmail. com) wrote:
    I’m working on setting a date range for filtering that is created
    OnClick of a button.
    I want to use the current date as the EndDate and the StartDate I want
    to be the 01/01/SameYear.
    >
    Example:
    >
    Start 01/01/2008 End 08/13/2008
    >
    Using the Date function to give the current date, how do I code to
    create the start date as displayed. Can it be done mathematically, is
    there a function, or does is require parsing?
    >
    Thanks
    Greg
    >
    Function
    ? DateSerial(Year (date),1,1)
    Mathematically
    ?Date-format(date,"y" )+1
    Parse
    ? "1/1" & Year(date)

    Sleep

    Comment

    • Greg (codepug@gmail.com)

      #3
      Re: Date Range Starting with 01/01 Jan01 of the same year

      Great !

      Thanks Salad


      Greg


      On Aug 13, 6:36 pm, Salad <o...@vinegar.c omwrote:
      Greg (code...@gmail. com) wrote:
      I’m working on setting a date range for filtering that is created
      OnClick of a button.
      I want to use the current date as the EndDate and the StartDate I want
      to be the 01/01/SameYear.
      >
      Example:
      >
      Start  01/01/2008    End  08/13/2008
      >
      Using the Date function to give the current date, how do I code to
      create the start date as displayed. Can it be done mathematically, is
      there a function, or does is require parsing?
      >
      Thanks
      Greg
      >
      Function
      ? DateSerial(Year (date),1,1)
      Mathematically
      ?Date-format(date,"y" )+1
      Parse
      ? "1/1" & Year(date)
      >
      Sleephttp://www.youtube.com/watch?v=HgQejnO WCEE- Hide quoted text -
      >
      - Show quoted text -

      Comment

      Working...