PC Review


Reply
Thread Tools Rate Thread

DateTime datatype in VBA

 
 
=?Utf-8?B?QWxleA==?=
Guest
Posts: n/a
 
      30th Jan 2007
Hello.

When i am trying to use DateTime Datatype in my VBA macro, it gives me
"Automation type not supported by visual basic"

do i have to add some kind of reference to the specific library ? i cannot
find any information on this.

Thank you
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th Jan 2007
Try using just Date. It supports both Date and Time...
--
HTH...

Jim Thomlinson


"Alex" wrote:

> Hello.
>
> When i am trying to use DateTime Datatype in my VBA macro, it gives me
> "Automation type not supported by visual basic"
>
> do i have to add some kind of reference to the specific library ? i cannot
> find any information on this.
>
> Thank you

 
Reply With Quote
 
=?Utf-8?B?QWxleA==?=
Guest
Posts: n/a
 
      30th Jan 2007
Hello Jim.
First of all thank you for responding so quickly.

I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format
and a value in minutes for example 2

then i will make 2 minute sql statements to find out min/max of certain
value over that period of time

so i need to manipulate datetime i couldnt find anything for date datatype
that can be equal to DateTime.AddMinutes

"Jim Thomlinson" wrote:

> Try using just Date. It supports both Date and Time...
> --
> HTH...
>
> Jim Thomlinson
>
>
> "Alex" wrote:
>
> > Hello.
> >
> > When i am trying to use DateTime Datatype in my VBA macro, it gives me
> > "Automation type not supported by visual basic"
> >
> > do i have to add some kind of reference to the specific library ? i cannot
> > find any information on this.
> >
> > Thank you

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th Jan 2007
Sorry about taking so long to get back to you (meetings). Try something like
this...

Dim dte As Date

dte = Now()
MsgBox dte

dte = dte + TimeSerial(0, 2, 0)
MsgBox dte

--
HTH...

Jim Thomlinson


"Alex" wrote:

> Hello Jim.
> First of all thank you for responding so quickly.
>
> I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format
> and a value in minutes for example 2
>
> then i will make 2 minute sql statements to find out min/max of certain
> value over that period of time
>
> so i need to manipulate datetime i couldnt find anything for date datatype
> that can be equal to DateTime.AddMinutes
>
> "Jim Thomlinson" wrote:
>
> > Try using just Date. It supports both Date and Time...
> > --
> > HTH...
> >
> > Jim Thomlinson
> >
> >
> > "Alex" wrote:
> >
> > > Hello.
> > >
> > > When i am trying to use DateTime Datatype in my VBA macro, it gives me
> > > "Automation type not supported by visual basic"
> > >
> > > do i have to add some kind of reference to the specific library ? i cannot
> > > find any information on this.
> > >
> > > Thank you

 
Reply With Quote
 
=?Utf-8?B?QWxleA==?=
Guest
Posts: n/a
 
      30th Jan 2007
Thank you very much. Solved my problem

"Jim Thomlinson" wrote:

> Sorry about taking so long to get back to you (meetings). Try something like
> this...
>
> Dim dte As Date
>
> dte = Now()
> MsgBox dte
>
> dte = dte + TimeSerial(0, 2, 0)
> MsgBox dte
>
> --
> HTH...
>
> Jim Thomlinson
>
>
> "Alex" wrote:
>
> > Hello Jim.
> > First of all thank you for responding so quickly.
> >
> > I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format
> > and a value in minutes for example 2
> >
> > then i will make 2 minute sql statements to find out min/max of certain
> > value over that period of time
> >
> > so i need to manipulate datetime i couldnt find anything for date datatype
> > that can be equal to DateTime.AddMinutes
> >
> > "Jim Thomlinson" wrote:
> >
> > > Try using just Date. It supports both Date and Time...
> > > --
> > > HTH...
> > >
> > > Jim Thomlinson
> > >
> > >
> > > "Alex" wrote:
> > >
> > > > Hello.
> > > >
> > > > When i am trying to use DateTime Datatype in my VBA macro, it gives me
> > > > "Automation type not supported by visual basic"
> > > >
> > > > do i have to add some kind of reference to the specific library ? i cannot
> > > > find any information on this.
> > > >
> > > > Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
databinding for datetime datatype =?Utf-8?B?UGVuIEp1YW4=?= Microsoft ASP .NET 7 10th Apr 2007 11:27 PM
DataColumn.Expression with DateTime Datatype Matt F Microsoft VB .NET 11 15th Mar 2007 04:19 PM
DateTime DataType Mismatch rn5a@rediffmail.com Microsoft ASP .NET 6 25th Feb 2007 05:50 PM
sql server 2000 datetime datatype Jesse Aufiero Microsoft Access Forms 1 6th Dec 2006 04:17 PM
Declaring a variable that is a datetime datatype .Net Sports Microsoft C# .NET 2 13th Jul 2005 12:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:56 AM.