Xojo Conferences
XDCMay2019MiamiUSA

Date notation (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: Can't See Properties in Properties
Next thread: Need so info on Action ()


RB Database   -   tom.russell transport.alstom.com
  Date notation   -   Lennox Jacob
   Re: Date notation   -   Mario Buchichio
    Re: Date notation   -   Lennox Jacob
     Re: Date notation   -   Marc-Hendrik Bremer
      Re: Date notation   -   Lennox Jacob
   Re: Date notation   -   Jon Guild
   Re: Date notation   -   Emile Schwarz
    Re: Date notation   -   Harrie Westphal
    Re: Date notation   -   Harrie Westphal
     Re: Date notation   -   Lennox Jacob
      Re: Date notation   -   Lennox Jacob

Date notation
Date: 02.02.05 13:59 (Wed, 02 Feb 2005 12:59:45 +0000)
From: Lennox Jacob
Hello,
i have this line of code
mydate.Text = appt.LongDate
this returns
Wednesday, February 2, 2005.
How could I modify it to return
February 2, 2005?
Please help.
Thanks.
Lennox.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 02.02.05 16:27 (Wed, 02 Feb 2005 12:27:12 -0300)
From: Mario Buchichio
I think you need to construct the string from the date properties:

mydate.text = str(appt.month) + " " + str(appt.day) + ", " + str(appt.year)

That should do it, maybe someone comes up with a better way that I'm
missing.

See ya.

Lennox Jacob escribió:

> Hello,
> i have this line of code
> mydate.Text = appt.LongDate
> this returns
> Wednesday, February 2, 2005.
> How could I modify it to return
> February 2, 2005?
> Please help.
> Thanks.
> Lennox.
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's
> FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 15:18 (Thu, 03 Feb 2005 14:18:33 +0000)
From: Lennox Jacob
Thanks Mario,
Let me give you some more details this is what I have
' Get the mydate date as a Date object
' Declare a new Date variable, mydate date
Dim mydate As Date
'Check to see if the input date is valid
if not ParseDate( ThisDate.Text, mydate ) then
Beep // invalid input
MsgBox "Please check date entered ... input error."
return
end if
'Now display input date in ThisDate as LongDate
ThisDate.Text =mydate.longdate
and this is what returns
Monday, February 23, 2004
How could I modify it to return
February 23, 2004
Thanks.
Lennox.

>From: Mario Buchichio <<email address removed>>
>Reply-To: Getting Started <<email address removed>>
>To: Getting Started <<email address removed>>
>Subject: Re: Date notation
>Date: Wed, 02 Feb 2005 12:27:12 -0300
>
>I think you need to construct the string from the date properties:
>
>mydate.text = str(appt.month) + " " + str(appt.day) + ", " +
>str(appt.year)
>
>That should do it, maybe someone comes up with a better way that I'm
>missing.
>
>See ya.
>
>Lennox Jacob escribió:
>
>>Hello,
>>i have this line of code
>>mydate.Text = appt.LongDate
>>this returns
>>Wednesday, February 2, 2005.
>>How could I modify it to return
>>February 2, 2005?
>>Please help.
>>Thanks.
>>Lennox.
>>
>>_________________________________________________________________
>>Express yourself instantly with MSN Messenger! Download today it's FREE!
>>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>
>>_______________________________________________
>>Unsubscribe or switch delivery mode:
>><http://www.realsoftware.com/support/listmanager/>
>>
>>Search the archives of this list here:
>><http://www.realsoftware.com/listarchives/lists.html>
>>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives of this list here:
><http://www.realsoftware.com/listarchives/lists.html>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 15:42 (Thu, 3 Feb 2005 15:42:49 +0100)
From: Marc-Hendrik Bremer
Lennox Jacob wrote:

> and this is what returns
> Monday, February 23, 2004
> How could I modify it to return
> February 23, 2004
> Thanks.
> Lennox.
>

Why don't you just serch for the first "," in the sting and take just the
part which is right of that position?

Marc-Hendrik

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 16:19 (Thu, 03 Feb 2005 15:19:21 +0000)
From: Lennox Jacob
Thanks Marc-Hendrik,
This worked, I removed "," as you recommended,
ThisDate.Text = str(mydate.month) + " " + str(mydate.day) + " " +
str(mydate.year)
it returned 7-6-2004 when I input 7-6-04, but I want it to return July 6,
2004.

>From: "Marc-Hendrik Bremer" <<email address removed>>
>Reply-To: Getting Started <<email address removed>>
>To: "Getting Started" <<email address removed>>
>Subject: Re: Date notation
>Date: Thu, 3 Feb 2005 15:42:49 +0100
>
>Lennox Jacob wrote:
>
>>and this is what returns
>>Monday, February 23, 2004
>>How could I modify it to return
>>February 23, 2004
>>Thanks.
>>Lennox.
>>
>Why don't you just serch for the first "," in the sting and take just the
>part which is right of that position?
>
>Marc-Hendrik
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives of this list here:
><http://www.realsoftware.com/listarchives/lists.html>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 02:43 (Wed, 2 Feb 2005 20:43:01 -0500)
From: Jon Guild
Since appt.month will be an integer, I'd also suggest a Select Case
statement to display/format the month's name, such as (monthName is
defined as a String):

Select Case appt.month
Case 1
monthName = "January"
Case 2
monthName = "February"

and so forth, until

Case 12
monthName = "December"
Else
'Something's wrong, so catch the error
End Select

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 08:43 (Thu, 03 Feb 2005 08:43:54 +0100)
From: Emile Schwarz
Hi,

I do not read the previous messages in this thread so...

But in the following code, why don't you instead create monthName(12) as String,
feed it with the month names and get the wanted month name:

MsgBox "Wanted month name for month number: " + Str(App.Month) + " [" +
monthName(App.Month).

Of course, in the monthName array, Index 0 is empty, Index 1 to 12 are filled by
the Month names (January to December|Janvier to Décembre) and App.Month have to
have a value in the 1 to 12 range.

Now, you may not have to do all of this stuff and use a different road depending
on what you want to do (and since I didn't read the thread until this mail, I do
not know).

HTH,

Emile

<email address removed> wrote:
> Subject: Re: Date notation
> From: Jon Guild <<email address removed>>
> Date: Wed, 2 Feb 2005 20:43:01 -0500
>
> Since appt.month will be an integer, I'd also suggest a Select Case
> statement to display/format the month's name, such as (monthName is
> defined as a String):
>
> Select Case appt.month
> Case 1
> monthName = "January"
> Case 2
> monthName = "February"
>
> and so forth, until
>
> Case 12
> monthName = "December"
> Else
> 'Something's wrong, so catch the error
> End Select

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 16:44 (Thu, 3 Feb 2005 09:44:32 -0600)
From: Harrie Westphal
Lennox,

Try this to get the date that you want from the longdate

Dim s As String // add this dim to the method where this code resides
s=mydate.longdate // gives date like Monday, February 23, 2004
ThisDate.Text=Mid(s,InStr(s," ")+2) // should give February 23, 2004

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 16:47 (Thu, 3 Feb 2005 09:47:23 -0600)
From: Harrie Westphal
Lennox,

The previous e-mail had a minor mistake, it should be:

Dim s As String // add this dim to the method where this code resides
s=mydate.longdate // gives date like Monday, February 23, 2004
ThisDate.Text=Mid(s,InStr(s," ")+1) // should give February 23, 2004

=#D A Mac addict in Tennessee =_
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 17:18 (Thu, 03 Feb 2005 16:18:07 +0000)
From: Lennox Jacob
Thanks Harrie,
I am a beginner so I may need a little more help.
I do not have a method there, but if I make it what do I name it, and which
action event do I use, anyhow this is how I modified what I had

' Get the mydate date as a Date object
' Declare a new Date variable, mydate date
Dim mydate As Date
Dim s As String
'Check to see if the input date is valid
if not ParseDate( ThisDate.Text, mydate ) then
Beep // invalid input
MsgBox "Please check date entered ... input error."
return
end if
'Now display input date in ThisDate as LongDate
ThisDate.Text =mydate.longdate
s=mydate.longdate  // gives date like Monday, February 23, 2004
ThisDate.Text=Mid(s,InStr(s," ")+1)  // should give February 23, 2004

It now states "This method or property does not exist", obviously I need to
make a methodPlease help.
Thanks.
Lennox.

>From: Harrie Westphal <<email address removed>>
>Reply-To: Getting Started <<email address removed>>
>To: Getting Started <<email address removed>>
>Subject: Re: Date notation
>Date: Thu, 3 Feb 2005 09:47:23 -0600
>
>Lennox,
>
>The previous e-mail had a minor mistake, it should be:
>
>Dim s As String // add this dim to the method where this code resides
>s=mydate.longdate // gives date like Monday, February 23, 2004
>ThisDate.Text=Mid(s,InStr(s," ")+1) // should give February 23, 2004
>
>=== A Mac addict in Tennessee ===
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives of this list here:
><http://www.realsoftware.com/listarchives/lists.html>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Date notation
Date: 03.02.05 17:56 (Thu, 03 Feb 2005 16:56:16 +0000)
From: Lennox Jacob
Thanks Harrie,
I did some clean-up and removed two spaces, it now works, I did not have to
put in a method. This is what I have now.
' Get the mydate date as a Date object
' Declare a new Date variable, mydate date
Dim mydate As Date
Dim s As String
'Check to see if the input date is valid
if not ParseDate( ThisDate.Text, mydate ) then
Beep // invalid input
MsgBox "Please check date entered ... input error."
return
end if
'Now display input date in ThisDate as LongDate
'ThisDate.Text =mydate.longdate
s=mydate.longdate // gives date like Monday, February 23, 2004
ThisDate.Text=Mid(s,InStr(s," ")+1) // should give February 23, 2004

This line is a bit complex for me
ThisDate.Text=Mid(s,InStr(s," ")+1) // should give February 23, 2004
anyhow it works now.
Thanks again.
Lennox.

>>From: Harrie Westphal <<email address removed>>
>>Reply-To: Getting Started <<email address removed>>
>>To: Getting Started <<email address removed>>
>>Subject: Re: Date notation
>>Date: Thu, 3 Feb 2005 09:47:23 -0600
>>
>>Lennox,
>>
>>The previous e-mail had a minor mistake, it should be:
>>
>>Dim s As String // add this dim to the method where this code resides
>>s=mydate.longdate // gives date like Monday, February 23, 2004
>>ThisDate.Text=Mid(s,InStr(s," ")+1) // should give February 23, 2004
>>
>>=== A Mac addict in Tennessee ===
>>
>>_______________________________________________
>>Unsubscribe or switch delivery mode:
>><http://www.realsoftware.com/support/listmanager/>
>>
>>Search the archives of this list here:
>><http://www.realsoftware.com/listarchives/lists.html>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives of this list here:
><http://www.realsoftware.com/listarchives/lists.html>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>