473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Show calendarweek in Datagrid possible

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
Nov 18 '05 #1
0 787

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Maurice | last post by:
Hi does anyone know if it's possible in .NET to display a multicolumn list like in MSAccess? I'm building an application in which a user can enter a search text and the application will then show...
3
by: jcfilth | last post by:
Hello, I have created an asp.net web page with 3 datagrids. Every datagrid binds to a diferent sql query, against a sql server. I first bind one, then the other and then the last, all using code...
2
by: Maurice | last post by:
Hi does anyone know if it's possible in .NET to display a multicolumn list like in MSAccess? I'm building an application in which a user can enter a search text and the application will then show...
1
by: simonyong | last post by:
hello, everyone Sorry for disturb.. im newbie to asp.net im trying to do a task that as below: In a SAME datagrid, it ll show all data when user key in key word in textbox... datagrid will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.