Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Show calendarweek in Datagrid possible

Thread Tools

Show calendarweek in Datagrid possible

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


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)


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)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendarweek in SimpleDateFormat Peter Rank Java 6 01-27-2008 06:24 PM
TO show or NOT to show Matt ASP .Net 1 05-02-2005 09:07 PM
to show image or to show flash Disco Octopus HTML 7 05-14-2004 06:27 AM
Command "show run" does not show all interfaces Peter Jonas Cisco 3 01-05-2004 12:13 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM