Show calendarweek in Datagrid possible

A

aaapaul

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top