LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Nathan Brindle <[log in to unmask]>
Tue, 9 Apr 2002 11:26:39 EDT
text/plain (49 lines)
What you are looking for is a way to express the C language expression

 time(0)/86400 + 719162

in Visual Basic or VBA.

time(0)/86400 is simply the number of days since a particular base date,
whatever that base date is in the C language.  (I'm not a C programmer,
I just hack around with C when I'm not coding in REXX :)

So what you are looking for becomes some way to express the number of
days since 1 Jan 0001.  Can you calculate days between dates?

(If you prefer to calculate from a closer known base date, 1 Jan 1900
is 693595; 1 Jan 2000 is 730119.)

Nathan

On Tue, 9 Apr 2002 08:57:48 -0400 Steven Sobol said:
>This seems to me to have the same problem as the previous answer. First,
>it's not a separate field, it's part of the options field, and second, it's
>an integer (probably a long integer).
>
>Am I not expressing the problem properly?
>
>-----Original Message-----
>From: George Radford [mailto:[log in to unmask]]
>Sent: Monday, April 08, 2002 2:56 PM
>To: [log in to unmask]
>Subject: Re: Visual Basic formula or function to calculate timestamps?
>
>
>Hi Steven,
>
>On 12:14 PM 4/5/2002 or thereabouts, you wrote:
> >When inserting a record into the database (i.e., subscribing a new list
> >member), I'd like to include a timestamp so that the list owner knows when
> >the list member subscribed.
>
>If your ASP page is doing a SQL insert or calling a SQL stored procedure,
>you could use the SQL getdate() function which returns the database
>server's current date and time, in datetime format.  Another (even easier)
>way to do this is to set the table column's default to getdate() and then
>you don't have to insert anything at all -- SQL will fill it in for you
>automatically if you don't supply a value in the insert statement.
>
>Regards,
>George

ATOM RSS1 RSS2