Show calendarweek in Datagrid possible

Discussion in 'ASP .Net' started by aaapaul, Dec 17, 2003.

  1. aaapaul

    aaapaul Guest

    Is it possible to display the calendarweek and year of date-columum in a datagrid ?

    example:

    Datagrid now:
    ordernr date
    12 31.12.2003
    27 01.01.2004

    wished Datagrid:
    ordernr date
    12 2003/52
    27 2004/01

    Can I do this with the method:

    boundcolumn.DataFormatString = "{0:d-??...}"

    I need something like: boundcolumn.DataFormatString = "{0:d-yyyy-ww ????}"


    or are there other solutions ?

    Version 1
    Can I change the column to a string-field ?

    For Each dr In objDV.Table.Rows
    'Year and week of Date
    dr.Item(3) = Mid(dr.Item(3), 7, 4) & "/" & mid(dr.Item(3),4,2)
    Next

    or

    Version 2

    Can I create this expression in a stored procedure (mssql 2k)
    datepart(w,datexy) - but I need the week with length 2 (2003/07 not 2003/7)

    Thanks
    aaapaul
    aaapaul, Dec 17, 2003
    #1
    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. Matt

    TO show or NOT to show

    Matt, May 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    379
  2. Disco Octopus

    to show image or to show flash

    Disco Octopus, May 13, 2004, in forum: HTML
    Replies:
    7
    Views:
    2,419
    Toby A Inkster
    May 14, 2004
  3. Replies:
    1
    Views:
    580
    Evertjan.
    Sep 30, 2005
  4. Peter Rank

    Calendarweek in SimpleDateFormat

    Peter Rank, Jan 25, 2008, in forum: Java
    Replies:
    6
    Views:
    775
    Arne Vajhøj
    Jan 27, 2008
  5. Andreas Klemt
    Replies:
    0
    Views:
    292
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page