Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Getting week of year in C#?


Message #1 by "Oliver, Wells" <WOliver@l...> on Wed, 25 Sep 2002 12:41:53 -0700
Did this in VB.NET:

WOY = DatePart (DateInterval.WeekOfYear, objOrigDate)

There's no DatePart in C# so I'm a bit stumped. Any tips?

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com

Message #2 by "Alvin Ling" <alvin.ling@i...> on Wed, 25 Sep 2002 16:28:20 -0400
You can still use VB if you 

using Microsoft.VisualBasic;

... probably not the answer you're looking for but I've used it to fill
some C# gaps.

Alvin


> -----Original Message-----
> From: Oliver, Wells [mailto:WOliver@l...] 
> Sent: Wednesday, September 25, 2002 3:42 PM
> To: ASP+
> Subject: [aspx] Getting week of year in C#?
> 
> 
> Did this in VB.NET:
> 
> WOY = DatePart (DateInterval.WeekOfYear, objOrigDate)
> 
> There's no DatePart in C# so I'm a bit stumped. Any tips?
> 
> Wells Oliver
> Web Application Programmer
> Leviton Voice & Data
> xxx-xxx-xxxx
> http://www.levitonvoicedata.com
> 
> 
> ---
> 
> ASP.NET 1.0 Namespace Reference with C# 
> http://www.wrox.com/acon11.asp?ISBN=1861007442
> 
> ASP.NET 1.0 
> Namespace Reference with VB.NET 
> http://www.wrox.com/acon11.asp?ISBN=1861007450
> 
> These books 
> are a complete reference to the ASP.NET namespaces 
> for developers who are already familiar with using ASP.NET. 
> There is no trivial introductory material or useless .NET 
> hype and the presentation of the namespaces, in an easy-to use 
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes, 
> giving you those real-world tips that the documentation doesn't 
> offer, and demonstrating complex techniques with simple 
> examples.  
> 
> ---
> 
> 
> 


Message #3 by "Oliver, Wells" <WOliver@l...> on Wed, 25 Sep 2002 13:34:12 -0700
This would be great, but I believe DatePart (and DateInterval) are part of
VB.NET and not in Microsoft.VisualBasic.

-----Original Message-----
From: Alvin Ling [mailto:alvin.ling@i...] 
Sent: Wednesday, September 25, 2002 1:28 PM
To: ASP+
Subject: [aspx] RE: Getting week of year in C#?


You can still use VB if you 

using Microsoft.VisualBasic;

... probably not the answer you're looking for but I've used it to fill some
C# gaps.

Alvin


> -----Original Message-----
> From: Oliver, Wells [mailto:WOliver@l...]
> Sent: Wednesday, September 25, 2002 3:42 PM
> To: ASP+
> Subject: [aspx] Getting week of year in C#?
> 
> 
> Did this in VB.NET:
> 
> WOY = DatePart (DateInterval.WeekOfYear, objOrigDate)
> 
> There's no DatePart in C# so I'm a bit stumped. Any tips?
> 
> Wells Oliver
> Web Application Programmer
> Leviton Voice & Data
> xxx-xxx-xxxx
> http://www.levitonvoicedata.com
> 
> 
> ---
> 
> ASP.NET 1.0 Namespace Reference with C#
> http://www.wrox.com/acon11.asp?ISBN=1861007442
> 
> ASP.NET 1.0
> Namespace Reference with VB.NET 
> http://www.wrox.com/acon11.asp?ISBN=1861007450
> 
> These books
> are a complete reference to the ASP.NET namespaces 
> for developers who are already familiar with using ASP.NET. 
> There is no trivial introductory material or useless .NET 
> hype and the presentation of the namespaces, in an easy-to use 
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes, 
> giving you those real-world tips that the documentation doesn't 
> offer, and demonstrating complex techniques with simple 
> examples.  
> 
> ---
> 
> 
> 



---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces 
for developers who are already familiar with using ASP.NET. 
There is no trivial introductory material or useless .NET 
hype and the presentation of the namespaces, in an easy-to use 
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes, 
giving you those real-world tips that the documentation doesn't 
offer, and demonstrating complex techniques with simple 
examples.  

---


  Return to Index