Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

week and day names

Discussion in 'Information Technology' started by LGarcia, Jul 28, 2006.

Tags:
  1. LGarcia

    LGarcia
    Expand Collapse
    Guest

    Hi all,
    I have a startdate which I need to use to calculate weekly visits and from
    that, daily visits. I'm using the following to return the week:
    Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    I need something that will give me the dates of that week with the day
    names.
    Hope someone can help!
    TIA,
    LGarcia
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Valley Children Learn Punjabi/Sikh Dance And Culture At 2-week Camp Breaking News Jul 20, 2016
    Another week, another wolf Blogs Oct 17, 2015
    the weekend. Blogs Oct 17, 2015
    What a week..... Blogs Oct 17, 2015
    Shabad Of The Week: Bāvre ṯai Gi▫ān Bīcẖār Na Pā▫i▫ā Shabad of the Week Jun 2, 2014

  3. Lynn Trapp

    Lynn Trapp
    Expand Collapse
    Guest

    Take a look at the weekdayname function.

    --
    Lynn Trapp
    MS Access MVP
    www.ltcomputerdesigns.com
    Access Security: www.ltcomputerdesigns.com/Security.htm
    Jeff Conrad's Access Junkie List:
    http://home.bendbroadband.com/conradsystems/accessjunkie.html



    "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    > Hi all,
    > I have a startdate which I need to use to calculate weekly visits and from
    > that, daily visits. I'm using the following to return the week:
    > Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    > I need something that will give me the dates of that week with the day
    > names.
    > Hope someone can help!
    > TIA,
    > LGarcia
    >
    >
     
  4. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    GIven a date, you can get the day name as Format(MyDate, "ddd") to get Mon,
    Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday, Wednesday...

    Not quite sure what you mean by "give ... the dates of that week".

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    > Hi all,
    > I have a startdate which I need to use to calculate weekly visits and from
    > that, daily visits. I'm using the following to return the week:
    > Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    > I need something that will give me the dates of that week with the day
    > names.
    > Hope someone can help!
    > TIA,
    > LGarcia
    >
    >
     
  5. LGarcia

    LGarcia
    Expand Collapse
    Guest

    Thanks!
    "give...dates of that week": I can calculate the beginning of the week from
    the equation Week:
    DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example, if
    the result of the equation is 05/14/2006, I now need another equation(s)
    that will return the weekday names and dates during the week of
    5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
    5/20/2006 - Sat.
    It's for a report.
    Thanks again,
    LGarcia





    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:%23rIODtEeGHA.1272@TK2MSFTNGP03.phx.gbl...
    > GIven a date, you can get the day name as Format(MyDate, "ddd") to get
    > Mon,
    > Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
    > Wednesday...
    >
    > Not quite sure what you mean by "give ... the dates of that week".
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    > news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    >> Hi all,
    >> I have a startdate which I need to use to calculate weekly visits and
    >> from
    >> that, daily visits. I'm using the following to return the week:
    >> Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    >> I need something that will give me the dates of that week with the day
    >> names.
    >> Hope someone can help!
    >> TIA,
    >> LGarcia
    >>
    >>

    >
    >
     
  6. LGarcia

    LGarcia
    Expand Collapse
    Guest

    Thanks! Looks like this might work. I'll give it a shot as well.


    "Lynn Trapp" <ltrapp_NOSPAM@ltcomputerdesigns.com> wrote in message
    news:O74EvrEeGHA.3792@TK2MSFTNGP03.phx.gbl...
    > Take a look at the weekdayname function.
    >
    > --
    > Lynn Trapp
    > MS Access MVP
    > www.ltcomputerdesigns.com
    > Access Security: www.ltcomputerdesigns.com/Security.htm
    > Jeff Conrad's Access Junkie List:
    > http://home.bendbroadband.com/conradsystems/accessjunkie.html
    >
    >
    >
    > "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    > news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    >> Hi all,
    >> I have a startdate which I need to use to calculate weekly visits and
    >> from that, daily visits. I'm using the following to return the week:
    >> Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    >> I need something that will give me the dates of that week with the day
    >> names.
    >> Hope someone can help!
    >> TIA,
    >> LGarcia
    >>
    >>

    >
    >
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Mon, 15 May 2006 14:20:49 -0500, "LGarcia"
    <lgarcia@sph.uth.tmc.edu_nospam> wrote:

    > I now need another equation(s)
    >that will return the weekday names and dates during the week of
    >5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
    >5/20/2006 - Sat.


    You don't need any equation at all.

    Simply display the date on the Report, using a format such as

    ddd, mm/dd/yyyy


    John W. Vinson[MVP]
     
  8. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Unless STUDYStartDate is always the same day of the week, you'll likely have
    to write a function that determines the Sunday (or Monday) previous to a
    given date, and the Saturday (or Friday) after it.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    news:uBnhvSFeGHA.3888@TK2MSFTNGP04.phx.gbl...
    > Thanks!
    > "give...dates of that week": I can calculate the beginning of the week
    > from the equation Week:
    > DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example,
    > if the result of the equation is 05/14/2006, I now need another
    > equation(s) that will return the weekday names and dates during the week
    > of 5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
    > 5/20/2006 - Sat.
    > It's for a report.
    > Thanks again,
    > LGarcia
    >
    >
    >
    >
    >
    > "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:%23rIODtEeGHA.1272@TK2MSFTNGP03.phx.gbl...
    >> GIven a date, you can get the day name as Format(MyDate, "ddd") to get
    >> Mon,
    >> Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
    >> Wednesday...
    >>
    >> Not quite sure what you mean by "give ... the dates of that week".
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >> "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    >> news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    >>> Hi all,
    >>> I have a startdate which I need to use to calculate weekly visits and
    >>> from
    >>> that, daily visits. I'm using the following to return the week:
    >>> Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    >>> I need something that will give me the dates of that week with the day
    >>> names.
    >>> Hope someone can help!
    >>> TIA,
    >>> LGarcia
    >>>
    >>>

    >>
    >>

    >
    >
     
  9. LGarcia

    LGarcia
    Expand Collapse
    Guest

    Hi again,
    STUDYStartDate is static. So my Week variable will be different for each
    week the study is running.
    My end result (I hope) will be a report with a "For the week of: & [Week]"
    in the header, and columns or rows with the dates and names of the days
    within [Week]. followed by activities.
    For example:
    For the week of: 05/21/2006
    05/22/2006 - Mon - collect ht & wt
    05/23/2006 - Tue - collect urine sample
    etc.......

    The report will be ran weekly until the study is completed.

    I found the Day function. I think I can use it as well.
    Thanks for all the suggestions.


    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:%2399FMeGeGHA.1436@TK2MSFTNGP05.phx.gbl...
    > Unless STUDYStartDate is always the same day of the week, you'll likely
    > have to write a function that determines the Sunday (or Monday) previous
    > to a given date, and the Saturday (or Friday) after it.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    > news:uBnhvSFeGHA.3888@TK2MSFTNGP04.phx.gbl...
    >> Thanks!
    >> "give...dates of that week": I can calculate the beginning of the week
    >> from the equation Week:
    >> DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example,
    >> if the result of the equation is 05/14/2006, I now need another
    >> equation(s) that will return the weekday names and dates during the week
    >> of 5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
    >> 5/20/2006 - Sat.
    >> It's for a report.
    >> Thanks again,
    >> LGarcia
    >>
    >>
    >>
    >>
    >>
    >> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    >> news:%23rIODtEeGHA.1272@TK2MSFTNGP03.phx.gbl...
    >>> GIven a date, you can get the day name as Format(MyDate, "ddd") to get
    >>> Mon,
    >>> Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
    >>> Wednesday...
    >>>
    >>> Not quite sure what you mean by "give ... the dates of that week".
    >>>
    >>> --
    >>> Doug Steele, Microsoft Access MVP
    >>> http://I.Am/DougSteele
    >>> (no e-mails, please!)
    >>>
    >>>
    >>> "LGarcia" <lgarcia@sph.uth.tmc.edu_nospam> wrote in message
    >>> news:ORuyR1DeGHA.3484@TK2MSFTNGP04.phx.gbl...
    >>>> Hi all,
    >>>> I have a startdate which I need to use to calculate weekly visits and
    >>>> from
    >>>> that, daily visits. I'm using the following to return the week:
    >>>> Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
    >>>> I need something that will give me the dates of that week with the day
    >>>> names.
    >>>> Hope someone can help!
    >>>> TIA,
    >>>> LGarcia
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     

Share This Page