List Info

Thread: Re: "Exploding date range"




Re: "Exploding date range"
country flaguser name
United States
2007-04-22 18:26:37
Why wouldn't you use the DateTime object, and then do a
ToString( dd
MMMM yyyy) on it?

I believe the command is something like this, where
myDateTimeValue is
your date and possibly time.  Note that myDateTime can be
something
like "10 Jan 2006" (i.e. without the time) and it
will still work:

Function ConvertDate( ByVal myDateTimeValue as String) as
String
Dim dtMyDateTime as DateTime =
DateTime.Parse(myDateTimeValue)
return dtMyDateTime.ToString( "dd MMMM yyyy" )
End Function

I also believe that "[dd] [Long month name] [4 digit
year]" is a
standard format of the ToString method, but I can't be
bothered
searching for it.  Perhaps try the MSDN website.

Kris Rhodes
----
MS CRM Certified (Installation & Configuration,
Customisation)
CRM 3.0/VB.NET 1.1 Developer
Quantum Business Technology
Perth  West Australia

This post is intended to be advice and advice only.

On Apr 22, 10:12 pm, Fendi Baba <effe...epitome.com.sg> wrote:
> I need to set a parameter for start date and date/ It
is possible to
> run a VB.net command that will split the dates. For
example, in my
> database, I have two dates: 1 Jan 2007 and 10 January
2007 would like
> a write a function that returns 1 January 22007, 2
January 2007, 3
> January 2007,.. 10 January 2007.
>
> Once this is done, I would like the value to be
accessible from a list
> box.
>
> Thanks in advance for any tips on this.
>
> Regarfs


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "ASP.Net Community" group.
To post to this group, send email to aspnetgooglegroups.com
To unsubscribe from this group, send email to
aspnet-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/aspnet?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: "Exploding date range"
country flaguser name
United States
2007-04-23 10:24:44
Hi, thanks for the reply. How does this help me get the
values between
two given dates automatically. ie. everything between 1
Januarry 2007
and 10 January 2007. Is there such a function in VB.net do i
have to
do a loop from 1st Jan to 10 Jan to get all the values?

Regards

On Apr 23, 7:26 am, Kris Rhodes <rhode...gmail.com> wrote:
> Why wouldn't you use the DateTime object, and then do a
ToString( dd
> MMMM yyyy) on it?
>
> I believe the command is something like this, where
myDateTimeValue is
> your date and possibly time.  Note that myDateTime can
be something
> like "10 Jan 2006" (i.e. without the time)
and it will still work:
>
> Function ConvertDate( ByVal myDateTimeValue as String)
as String
> Dim dtMyDateTime as DateTime =
DateTime.Parse(myDateTimeValue)
> return dtMyDateTime.ToString( "dd MMMM yyyy"
)
> End Function
>
> I also believe that "[dd] [Long month name] [4
digit year]" is a
> standard format of the ToString method, but I can't be
bothered
> searching for it.  Perhaps try the MSDN website.
>
> Kris Rhodes
> ----
> MS CRM Certified (Installation & Configuration,
Customisation)
> CRM 3.0/VB.NET 1.1 Developer
> Quantum Business Technology
> Perth  West Australia
>
> This post is intended to be advice and advice only.
>
> On Apr 22, 10:12 pm, Fendi Baba <effe...epitome.com.sg> wrote:
>
>
>
> > I need to set a parameter for start date and date/
It is possible to
> > run a VB.net command that will split the dates.
For example, in my
> > database, I have two dates: 1 Jan 2007 and 10
January 2007 would like
> > a write a function that returns 1 January 22007, 2
January 2007, 3
> > January 2007,.. 10 January 2007.
>
> > Once this is done, I would like the value to be
accessible from a list
> > box.
>
> > Thanks in advance for any tips on this.
>
> > Regarfs- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "ASP.Net Community" group.
To post to this group, send email to aspnetgooglegroups.com
To unsubscribe from this group, send email to
aspnet-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/aspnet?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )