Getting WorkWeek Values?

Discussion in 'ASP General' started by M P, Jul 6, 2004.

  1. M P

    M P Guest

    I can easily get the current date by using Date(), how about WorkWeek?

    Mark
    M P, Jul 6, 2004
    #1
    1. Advertising

  2. M P

    Ken Schaefer Guest

    What is a "work week"?

    Cheers
    Ken


    "M P" <> wrote in message
    news:...
    : I can easily get the current date by using Date(), how about WorkWeek?
    :
    : Mark
    :
    :
    Ken Schaefer, Jul 6, 2004
    #2
    1. Advertising

  3. M P

    M P Guest

    workweek calendar. Like 2004, we have 53 work weeks.


    "Ken Schaefer" <> wrote in message
    news:#...
    > What is a "work week"?
    >
    > Cheers
    > Ken
    >
    >
    > "M P" <> wrote in message
    > news:...
    > : I can easily get the current date by using Date(), how about WorkWeek?
    > :
    > : Mark
    > :
    > :
    >
    >
    M P, Jul 6, 2004
    #3
  4. M P

    Ken Schaefer Guest

    What is the difference between a "work week", and a "week"?
    What about partial weeks? (eg if 1st January 2004 is a Thursday?)

    Cheers
    Ken


    "M P" <> wrote in message
    news:%...
    : workweek calendar. Like 2004, we have 53 work weeks.
    :
    :
    : "Ken Schaefer" <> wrote in message
    : news:#...
    : > What is a "work week"?
    : >
    : > Cheers
    : > Ken
    : >
    : >
    : > "M P" <> wrote in message
    : > news:...
    : > : I can easily get the current date by using Date(), how about WorkWeek?
    : > :
    : > : Mark
    : > :
    : > :
    : >
    : >
    :
    :
    Ken Schaefer, Jul 6, 2004
    #4
  5. M P

    M P Guest

    You don't get what I mean.
    Ex. Today is 06-Jul-2004 under WorkWeek 28, for next week its Work Week 29,
    and so on...

    What I mean with workweek is the work week calendar.
    "Ken Schaefer" <> wrote in message
    news:...
    > What is the difference between a "work week", and a "week"?
    > What about partial weeks? (eg if 1st January 2004 is a Thursday?)
    >
    > Cheers
    > Ken
    >
    >
    > "M P" <> wrote in message
    > news:%...
    > : workweek calendar. Like 2004, we have 53 work weeks.
    > :
    > :
    > : "Ken Schaefer" <> wrote in message
    > : news:#...
    > : > What is a "work week"?
    > : >
    > : > Cheers
    > : > Ken
    > : >
    > : >
    > : > "M P" <> wrote in message
    > : > news:...
    > : > : I can easily get the current date by using Date(), how about

    WorkWeek?
    > : > :
    > : > : Mark
    > : > :
    > : > :
    > : >
    > : >
    > :
    > :
    >
    >
    M P, Jul 6, 2004
    #5
  6. M P

    McKirahan Guest

    "M P" <> wrote in message
    news:...
    > You don't get what I mean.
    > Ex. Today is 06-Jul-2004 under WorkWeek 28, for next week its Work Week

    29,
    > and so on...


    Enter this in the IE Address line and press Enter:

    vbscript:DatePart("ww",Date())

    vbscript:DatePart("ww",#12/31/2004#)
    McKirahan, Jul 6, 2004
    #6
  7. M P

    Larry Bud Guest

    "McKirahan" <> wrote in message news:<6evGc.31193$a24.28857@attbi_s03>...
    > "M P" <> wrote in message
    > news:...
    > > You don't get what I mean.
    > > Ex. Today is 06-Jul-2004 under WorkWeek 28, for next week its Work Week

    > 29,
    > > and so on...

    >
    > Enter this in the IE Address line and press Enter:
    >
    > vbscript:DatePart("ww",Date())
    >
    > vbscript:DatePart("ww",#12/31/2004#)


    Holy cow. never knew ie would do that.
    Larry Bud, Jul 6, 2004
    #7
  8. Larry Bud wrote:
    >>
    >> Enter this in the IE Address line and press Enter:
    >>
    >> vbscript:DatePart("ww",Date())
    >>
    >> vbscript:DatePart("ww",#12/31/2004#)

    >
    > Holy cow. never knew ie would do that.


    VBScript or scripting from the location bar? By my observation, all
    script-enabled browsers allow some amount of location bar scripting. I
    noticed something rather interesting, though:

    --- FireFox 0.9.1 and Mozilla 1.7 ---
    javascript:alert(123) Success
    jscript:alert(123) Nothing
    ecmascript:alert(123) Nothing
    vbscript:alert(123) Redirect to http://www.vbscript.com/home/

    --- IE6 ---
    javascript:alert(123) Success
    jscript:alert(123) Location changes to vbscript:alert(123)
    ecmascript:alert(123) Location changes to javascript:alert(123)
    vbscript:alert(123) Success

    --- Opera 7.23 ---
    javascript:alert(123) Success
    jscript:alert(123) Error: Unsupported
    ecmascript:alert(123) Error: Unsupported
    vbscript:alert(123) Error: Unsupported

    Why on Earth would jscript: change to vbscript: ?



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jul 6, 2004
    #8
  9. M P

    M P Guest

    Thanks McKirahan!

    "McKirahan" <> wrote in message
    news:6evGc.31193$a24.28857@attbi_s03...
    > "M P" <> wrote in message
    > news:...
    > > You don't get what I mean.
    > > Ex. Today is 06-Jul-2004 under WorkWeek 28, for next week its Work Week

    > 29,
    > > and so on...

    >
    > Enter this in the IE Address line and press Enter:
    >
    > vbscript:DatePart("ww",Date())
    >
    > vbscript:DatePart("ww",#12/31/2004#)
    >
    >
    M P, Jul 7, 2004
    #9
  10. M P

    Ken Schaefer Guest

    ....no, you don't get what I mean. What the hell is a "work week"? Is there a
    definition, or it is just something you made up? Or is it just the week of
    the year? And if it's just the week of the year, how do you classify partial
    weeks?

    Cheers
    Ken


    "M P" <> wrote in message
    news:...
    : You don't get what I mean.
    : Ex. Today is 06-Jul-2004 under WorkWeek 28, for next week its Work Week
    29,
    : and so on...
    :
    : What I mean with workweek is the work week calendar.
    : "Ken Schaefer" <> wrote in message
    : news:...
    : > What is the difference between a "work week", and a "week"?
    : > What about partial weeks? (eg if 1st January 2004 is a Thursday?)
    : >
    : > Cheers
    : > Ken
    : >
    : >
    : > "M P" <> wrote in message
    : > news:%...
    : > : workweek calendar. Like 2004, we have 53 work weeks.
    : > :
    : > :
    : > : "Ken Schaefer" <> wrote in message
    : > : news:#...
    : > : > What is a "work week"?
    : > : >
    : > : > Cheers
    : > : > Ken
    : > : >
    : > : >
    : > : > "M P" <> wrote in message
    : > : > news:...
    : > : > : I can easily get the current date by using Date(), how about
    : WorkWeek?
    : > : > :
    : > : > : Mark
    : > : > :
    : > : > :
    : > : >
    : > : >
    : > :
    : > :
    : >
    : >
    :
    :
    Ken Schaefer, Jul 7, 2004
    #10
  11. > ...no, you don't get what I mean. What the hell is a "work week"? Is there
    a
    > definition, or it is just something you made up? Or is it just the week of
    > the year?


    Ken, there is a generic term that is included in DATEPART calculations that
    indicates the week number of the year. For most of us, this is simply the
    number of weeks since the first week of the year, going down the calendar.
    If the year starts on a Saturday, then Jan 2nd is in week 2.

    In VBScript, you can see it this way:

    <%
    response.write DatePart("ww", date())
    %>

    In T-SQL:

    SELECT DATEPART(WEEK, CURRENT_TIMESTAMP)

    You will need to calculate this differently if you have a different
    definition of week in your company, e.g. using a calendar table (see
    http://www.aspfaq.com/2519). I plan on adding such an example to that
    article in the near future.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jul 7, 2004
    #11
  12. M P

    Ken Schaefer Guest

    Hi Aaron,

    What I was trying to work out is whether the OP was just asking for the
    "week of the year", or does he have some other definition for what a "work
    week" is? Maybe "work week" is some kind of technical term or "term of art"
    that means something that I'm unfamiliar with.

    Cheers
    Ken


    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    : > ...no, you don't get what I mean. What the hell is a "work week"? Is
    there
    : a
    : > definition, or it is just something you made up? Or is it just the week
    of
    : > the year?
    :
    : Ken, there is a generic term that is included in DATEPART calculations
    that
    : indicates the week number of the year. For most of us, this is simply the
    : number of weeks since the first week of the year, going down the calendar.
    : If the year starts on a Saturday, then Jan 2nd is in week 2.
    :
    : In VBScript, you can see it this way:
    :
    : <%
    : response.write DatePart("ww", date())
    : %>
    :
    : In T-SQL:
    :
    : SELECT DATEPART(WEEK, CURRENT_TIMESTAMP)
    :
    : You will need to calculate this differently if you have a different
    : definition of week in your company, e.g. using a calendar table (see
    : http://www.aspfaq.com/2519). I plan on adding such an example to that
    : article in the near future.
    :
    : --
    : http://www.aspfaq.com/
    : (Reverse address to reply.)
    :
    :
    Ken Schaefer, Jul 8, 2004
    #12
    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. Jorgen Gustafsson
    Replies:
    4
    Views:
    581
    Jorgen Gustafsson
    Dec 12, 2003
  2. S. Justin Gengo
    Replies:
    2
    Views:
    362
    S. Justin Gengo
    Aug 20, 2003
  3. Richard Dixson
    Replies:
    1
    Views:
    507
    Joe Fallon
    May 18, 2004
  4. Richard Dixson
    Replies:
    2
    Views:
    730
    Richard Dixson
    May 18, 2004
  5. Replies:
    5
    Views:
    3,655
    Roedy Green
    Apr 9, 2006
Loading...

Share This Page