473,320 Members | 2,003 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,320 software developers and data experts.

Is this an error of .NET Framework ???

I use the function Right() to take the year of the Date in String.

Dim S_Year as String
Dim S_Date as String

S_Date="1/7/2004" '( d/m/y)

S_Year= Microsoft.VisualBasic.Right(S_Date, InStrRev(S_Date, "/", -1)
- 1)

it give me sometimes "004" and sometimes "2004". I dont know why.
Maybe it is an error from .NET Framework ? ( Version 1 1.0.3705)
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 20 '05 #1
6 1098
Can you provide example dates where the wrong value is returned?

-- Alex Papadimoulis

"Lighting_dragon" <as*@asd-dot-com.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
I use the function Right() to take the year of the Date in String.

Dim S_Year as String
Dim S_Date as String

S_Date="1/7/2004" '( d/m/y)

S_Year= Microsoft.VisualBasic.Right(S_Date, InStrRev(S_Date, "/", -1)
- 1)

it give me sometimes "004" and sometimes "2004". I dont know why.
Maybe it is an error from .NET Framework ? ( Version 1 1.0.3705)
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 20 '05 #2
* as*@asd-dot-com.no-spam.invalid (Lighting_dragon) scripsit:
I use the function Right() to take the year of the Date in String.

Dim S_Year as String
Dim S_Date as String

S_Date="1/7/2004" '( d/m/y)

S_Year= Microsoft.VisualBasic.Right(S_Date, InStrRev(S_Date, "/", -1)
- 1)

it give me sometimes "004" and sometimes "2004". I dont know why.
Maybe it is an error from .NET Framework ? ( Version 1 1.0.3705)


What do you mean by "sometimes"?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
"Lighting_dragon" <as*@asd-dot-com.no-spam.invalid> schrieb
I use the function Right() to take the year of the Date in String.
Dim S_Year as String
Dim S_Date as String

S_Date="1/7/2004" '( d/m/y)

S_Year= Microsoft.VisualBasic.Right(S_Date, InStrRev(S_Date, "/",
-1) - 1)

it give me sometimes "004" and sometimes "2004". I dont know why.
Maybe it is an error from .NET Framework ? ( Version 1 1.0.3705)

S_Year= Microsoft.VisualBasic.Right( _
S_Date, len(s_date) - InStrRev(S_Date, "/", -1) )

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
Oooo.. well spotted Armin!! I missed that by a gnat's nadger!!
_________________________
The Grim Reaper

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Lighting_dragon" <as*@asd-dot-com.no-spam.invalid> schrieb
I use the function Right() to take the year of the Date in String.
Dim S_Year as String
Dim S_Date as String

S_Date="1/7/2004" '( d/m/y)

S_Year= Microsoft.VisualBasic.Right(S_Date, InStrRev(S_Date, "/",
-1) - 1)

it give me sometimes "004" and sometimes "2004". I dont know why.
Maybe it is an error from .NET Framework ? ( Version 1 1.0.3705)

S_Year= Microsoft.VisualBasic.Right( _
S_Date, len(s_date) - InStrRev(S_Date, "/", -1) )

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
Why not just

dim y as integer = New Date(strDate).Year()

?
Richard
Nov 20 '05 #6
Sorry, that i didn't write exactly.
I have found the error self.
Thanks
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 20 '05 #7

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

Similar topics

1
by: Invalidlastname | last post by:
Hi, Our developer team recently started getting the compilation error, see below, once a while running the asp.net web application from Visual Studio 2003 (in debug mode), and we have to rebuild the...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
9
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web...
0
by: Jie | last post by:
Does anyone know why I keep having the following error. I have to rebuild the solution every time I run it in design mode. thanks jie Server Error in '/ReapPortal' Application....
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
2
by: Kevin R. | last post by:
I have been ignoring this problem for a few weeks now, but it's becoming a bit annoying not to mention unproductive. Here it goes: I compile my project with no errors. Then after I debug/run it,...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
21
by: Mark Rae | last post by:
Hi, I have an ASP.NET 2 web application (not web site) project and am using a web deployment project to deploy to the testing, then the production server. All has been working well for months...
0
by: gmsieling | last post by:
We're getting compiler error CS0006, with increasing frequency. It says that a randomly named DLL was not found. This happens at random intervals when you try to run the application. We're using the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.