2 Replies - 329 Views - Last Post: 24 January 2018 - 01:05 PM Rate Topic: -----

#1 ivan91340  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-January 18

Need help locating my error on VB Web Project

Posted 23 January 2018 - 10:24 PM

I am creating a code to show the day for valentine based on the user entering the years. this is what i have but i am not able to get the year part to work

Dim enteredyear As Integer = CInt(txtYear.Text)
        Dim valentineday As Date = New Date(enteredyear, 2, 17)
        txtResult.Text = valentineday.ToString("dddd") & ", February 14, 2017"
:code:

if i leave the year black of the last sentence then on the windows program it does not show a year in the output box, can anyone see what i am doing wrong please greatly appreciate it.

This post has been edited by modi123_1: 23 January 2018 - 10:25 PM
Reason for edit:: In the future, please use the [code] tag button in the editor..


Is This A Good Question/Topic? 0
  • +

Replies To: Need help locating my error on VB Web Project

#2 Radius Nightly  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 225
  • Joined: 07-May 15

Re: Need help locating my error on VB Web Project

Posted 24 January 2018 - 04:58 AM

DateTime.ToString Method (String) (System)
Was This Post Helpful? 0
  • +
  • -

#3 ivan91340  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-January 18

Re: Need help locating my error on VB Web Project

Posted 24 January 2018 - 01:05 PM

Thank you I will try that
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1