12 Replies - 569 Views - Last Post: 27 July 2012 - 03:02 AM
#1
If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 12:55 PM
Wondering if I can get aid in my dilemma; this app of mine I want it to display a string I've predefined in my code.
So inherently each day, a new text appears on the UI, next day something I've predefined appears etc. Each day a new variable (string) appears for the user.
I solely have no clue how to go about doing this, any help would be appreciated.
Thank you in advance.
Replies To: If date = dd/mm/yyyy then display myVariable (string)
#2
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:15 PM
#3
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:16 PM
I am confused as to what it is that you are trying to do. Can you try to explain in more detail
#4
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:31 PM
m_wylie85, on 04 June 2012 - 11:16 PM, said:
I am confused as to what it is that you are trying to do. Can you try to explain in more detail
Hi. Say to dissect it. The application has form1, on form1 say I have a string variable named foursix12 (this is a date: 4/6/12)that will display on textbox1; alright that's fine, but tomorrow I want to display fivesix12 on textbox1 and sixsix12 on textbox1 the day after. Like a "displaying the 'quote of the day'" kinda thing.
BobRodes, on 04 June 2012 - 11:15 PM, said:
In my code editor along with the rest of my code.
#5
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:43 PM
#6
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:46 PM
BobRodes, on 04 June 2012 - 11:43 PM, said:
OK; thanks let me take a profound ponder over that...
Will report later.
#7
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 04 June 2012 - 02:47 PM
This post has been edited by BobRodes: 04 June 2012 - 02:48 PM
#8
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 06 June 2012 - 02:46 AM
textbox1.text = date.now.toshortdatestring
and then do an If statement later to determine when to put in the other date.
Hope this helps.
#9
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 06 June 2012 - 06:55 AM
This post has been edited by BobRodes: 06 June 2012 - 06:57 AM
#10
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 06 June 2012 - 10:19 AM
PNJLj, on 06 June 2012 - 11:46 AM, said:
textbox1.text = date.now.toshortdatestring
and then do an If statement later to determine when to put in the other date.
Hope this helps.
That could be an additional feature, which would allow the user to select a previous date and display the string.
BobRodes, on 06 June 2012 - 03:55 PM, said:
Exactly the latter. I want to display a new string daily (at 00:00). I'll store the strings internally. How to do it; kinda trying it out.
#11
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 06 June 2012 - 06:48 PM
#12
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 27 July 2012 - 02:29 AM
I used
If Date.Today <= CDate(2012/06/26) Then 'Date of program inception
RichtextBox1.Text = "Oops! Your date is probably wrong! Check your date settings."
RichtextBox2.Text = "Oops! Your date is probably wrong! Check your date settings."
MessageBox.Show("Oops! Your date is probably wrong! Click OK for instructions")
If Date.Today = CDate(2012/07/27) Then
RichtextBox1.Text = Quote(71)
RichTextBox.LoadFile("C:\MyApp\20120727", RichTextBoxStreamType.PlainText)
If Date.Today >= CDate(2013/01/01) Then RichtextBox1.Text = "Upgrade your software! Click OK for instructions" RichTextBox.Text = "Upgrade your software! Please contact xxx"
#13
Re: If date = dd/mm/yyyy then display myVariable (string)
Posted 27 July 2012 - 03:02 AM
If Date.Today >= CDate(2013/01/01) Then
You are aware that this while do, the two divisions before converting to to a date.
vb.net does support americanised date literals.
' Americanised Date Format is used MM/DD/YYYY' If Date.Today >= #01/01/2012# Then
This post has been edited by AdamSpeight2008: 27 July 2012 - 03:09 AM
|
|

New Topic/Question
Reply




MultiQuote






|