Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / December 2005

Tip: Looking for answers? Try searching our database.

Q: convert this to Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JIM.H. - 30 Dec 2005 19:59 GMT
Hello,

This is my code in C#

DateTime sYear = new DateTime(Now(),1,1);
DateTime q1Start = sYear;
DateTime q2Start = sYear.AddMonths(3);
DateTime q3Start = sYear.AddMonths(6);
DateTime q4Start = sYear.AddMonths(9);
DateTime q1End = q2Start.AddDays(-1);
DateTime q2End = q3Start.AddDays(-1);
DateTime q3End = q4Start.AddDays(-1);
DateTime q4End = sYear.AddYears(1).AddDays(-1);

Can anyone convert this to VB.Net so that I can use it in “Code” section of
the Reporting Services. I tried a VB-C# converter but Reporting Services did
not like DateTime datatype.

Any help?
Potter - 30 Dec 2005 20:41 GMT
Jim,

Use System.DateTime, remove the semicolons and use VB.NET style
variable declaration.

Dim sYear as System.DateTime = blah

Andy Potter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.