Avatar of Hojoformo
Hojoformo

asked on 

How to get the DB2 Current date in Where Clause for VB Program.

I need some help with using the DB2 current date in my select where clause below for my VB program.   I know this is not the correct format.    Can someone please help.        
oCant.Append " And F.DT_RDG_TO < " & SELECT CURRENT_DATE FROM SYSIBM.SYSDUMMY1 oCant.Append " AND F.DT_RDG_TO > " & SELECT CURRENT_DATE - 12 MONTHS FROM SYSIBM.SYSDUMMY1            

Here is my Db2 SQL:
oCant.Str = "select "
                     oCant.Append " F.QY_DA_USE, "
                    oCant.Append " F.DT_RDG_TO, "
                    oCant.Append " F.KY_RDG_SEQ_NO "
                   oCant.Append " From "
                    oCant.Append strDBName & ".CU04TB08_RDCONSHDR F "
                    oCant.Append " Where "
                     oCant.Append " And A.KY_BA = F.KY_BA "
                    oCant.Append " And F.DT_RDG_TO < " & SELECT CURRENT_DATE FROM SYSIBM.SYSDUMMY1
                    oCant.Append " AND F.DT_RDG_TO > " & SELECT CURRENT_DATE - 12 MONTHS FROM SYSIBM.SYSDUMMY1
DB2Visual Basic.NETMicrosoft Development

Avatar of undefined
Last Comment
Member_2_2484401
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo