Assistance with changing column header Dates .................

Discussion in 'ASP General' started by David, Feb 13, 2007.

  1. David

    David Guest

    Hi,

    I need to set up an HTML table or the like, with 4 columns.
    Each column needs to have a header with a FRIDAY (dd/mm/yy) date.

    i.e. this weeks Fridays date is 16th Feb, the following is 23rd Feb
    etc.
    So, I need column 1 to be headed 16th Feb, col 2 to show 23rd Feb etc.
    As this week passes, the dates need to move up 1 week, so that next
    week, col 1 will display 23rd Feb and so on.
    These headers need to change according to the date.

    Please can you advise how I best achieve this ?

    Thanks

    David
     
    David, Feb 13, 2007
    #1
    1. Advertising

  2. David

    Patrick Guest

    You can use the Date function to get today's date. Then you can use the
    Weekday function to figure out which day it is. Once you know what day of
    the week it is, you can then calculate how many more days it is until the
    next Friday.

    Then you use DateAdd to add 7, 14, and 21 days to Friday and you've got your
    other 3 Fridays.

    "David" <> wrote in message
    news:...
    > Hi,
    >
    > I need to set up an HTML table or the like, with 4 columns.
    > Each column needs to have a header with a FRIDAY (dd/mm/yy) date.
    >
    > i.e. this weeks Fridays date is 16th Feb, the following is 23rd Feb
    > etc.
    > So, I need column 1 to be headed 16th Feb, col 2 to show 23rd Feb etc.
    > As this week passes, the dates need to move up 1 week, so that next
    > week, col 1 will display 23rd Feb and so on.
    > These headers need to change according to the date.
    >
    > Please can you advise how I best achieve this ?
    >
    > Thanks
    >
    > David
    >
     
    Patrick, Feb 16, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Lozzi

    Dates dates dates dates... SQL and ASP.NET

    David Lozzi, Sep 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    911
    Rob Schieber
    Sep 30, 2005
  2. hansiman

    Image in header column (not replacing column header text)

    hansiman, Feb 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    338
    hansiman
    Feb 7, 2004
  3. PW

    Dates! Dates! Dates!

    PW, Aug 7, 2004, in forum: ASP General
    Replies:
    4
    Views:
    235
    Mark Schupp
    Aug 9, 2004
  4. Replies:
    1
    Views:
    240
    Jano Svitok
    Jul 17, 2007
  5. kellygreer1

    RFC-822 dates into Ruby dates

    kellygreer1, Jun 8, 2008, in forum: Ruby
    Replies:
    1
    Views:
    269
    Eric I.
    Jun 8, 2008
Loading...

Share This Page