COleDateTime base date 30 Dec 1899. Why??

Hello all,
Not really an MFC question as such but I wondered if anybody knew.
Basically, I was working on a (MFC)project where an ADO recordset is 
populated from an SQLServer table with a large range of date records. 
The idea was to get more than I need then use the Filter property to 
show just a limited set. The reason for this was to only have one SQL 
Server round trip to fetch all the records for likely timespans.

Anyway I ran into trouble because the ADO Filter expects dates in local 
format. To cut a long story short I outputted the SQLServer date as a 
floating point number then convert the COleDateTime's also to float and 
filter based upon the floats. This works fine, although you have to take 
into account the different base date for the two data structures. 
SQLServer has a base date of 1st Jan 1900, which seems pretty reasonable 
to me. COleDateTime has a base date of 30th Dec 1899. OK the difference 
is 2 so it doesn't really matter, but I'm struggling to think of a 
reason why that particular date was chosen.

Anyone know why?

Cheers
0
cpeters (15)
5/21/2008 6:57:55 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
1402 Views

Similar Articles

[PageSpeed] 43

I guess it was a "child" mistake of a programmer who wrote this date/time 
part of MS-DOS.
Then MFC COleDateTime class inherited this bug with the DATE type.

Victor

"Colin Peters" <cpeters@coldmail.com> wrote in message 
news:483470b4$1_7@news.bluewin.ch...
> Hello all,
> Not really an MFC question as such but I wondered if anybody knew.
> Basically, I was working on a (MFC)project where an ADO recordset is 
> populated from an SQLServer table with a large range of date records. The 
> idea was to get more than I need then use the Filter property to show just 
> a limited set. The reason for this was to only have one SQL Server round 
> trip to fetch all the records for likely timespans.
>
> Anyway I ran into trouble because the ADO Filter expects dates in local 
> format. To cut a long story short I outputted the SQLServer date as a 
> floating point number then convert the COleDateTime's also to float and 
> filter based upon the floats. This works fine, although you have to take 
> into account the different base date for the two data structures. 
> SQLServer has a base date of 1st Jan 1900, which seems pretty reasonable 
> to me. COleDateTime has a base date of 30th Dec 1899. OK the difference is 
> 2 so it doesn't really matter, but I'm struggling to think of a reason why 
> that particular date was chosen.
>
> Anyone know why?
>
> Cheers 


0
5/21/2008 7:29:07 PM
On Wed, 21 May 2008 20:57:55 +0200, Colin Peters <cpeters@coldmail.com>
wrote:

>Hello all,
>Not really an MFC question as such but I wondered if anybody knew.
>Basically, I was working on a (MFC)project where an ADO recordset is 
>populated from an SQLServer table with a large range of date records. 
>The idea was to get more than I need then use the Filter property to 
>show just a limited set. The reason for this was to only have one SQL 
>Server round trip to fetch all the records for likely timespans.
>
>Anyway I ran into trouble because the ADO Filter expects dates in local 
>format. To cut a long story short I outputted the SQLServer date as a 
>floating point number then convert the COleDateTime's also to float and 
>filter based upon the floats. This works fine, although you have to take 
>into account the different base date for the two data structures. 
>SQLServer has a base date of 1st Jan 1900, which seems pretty reasonable 
>to me. COleDateTime has a base date of 30th Dec 1899. OK the difference 
>is 2 so it doesn't really matter, but I'm struggling to think of a 
>reason why that particular date was chosen.
>
>Anyone know why?

I think it ultimately has to do with Lotus 123, whose date format Excel
copied, including the bug which considered 1900 to be a leap year. Consider
this little program:

#include <afx.h>
#include <ATLComTime.h>
#include <stdio.h>

void print(double serial)
{
   COleDateTime d;
   d.m_status = COleDateTime::valid;
   d.m_dt = serial;
   printf("%f = %s\n", d.m_dt, (LPCSTR) d.Format());
}

int main()
{
   print(59);
   print(60);
   print(61);
   print(62);
}

Its output is:

59.000000 = 2/27/1900
60.000000 = 2/28/1900
61.000000 = 3/1/1900
62.000000 = 3/2/1900

Looks fine. Now consider the same values in Excel:

59	2/28/1900 12:00:00 AM
60	2/29/1900 12:00:00 AM
61	3/1/1900 12:00:00 AM
62	3/2/1900 12:00:00 AM

Again, 1900 was not a leap year, so Excel 2007 is still copying the Lotus
bug and I suppose always will. Notice that the formatted COleDateTime
values are one day less than the Excel values for serial numbers < 61, and
that they agree for serial numbers >= 61; the COleDateTime does not
incorrectly consider 1900 a leap year. So based on this, I'd guess that the
designers of the OLE DATE type wanted to be compatible with Excel, but they
didn't want to copy the Lotus bug, and they were willing to accept being
incompatible with Excel for this small range of early dates. Given the
popularity of Lotus 123 back in the day, the Excel designers no doubt felt
they couldn't afford even this small degree of incompatibility.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
5/21/2008 8:08:32 PM
Where do you get the link to MS-DOS??

Victor wrote:
> I guess it was a "child" mistake of a programmer who wrote this date/time 
> part of MS-DOS.
> Then MFC COleDateTime class inherited this bug with the DATE type.
> 
> Victor
> 
> "Colin Peters" <cpeters@coldmail.com> wrote in message 
> news:483470b4$1_7@news.bluewin.ch...
> 
>>Hello all,
>>Not really an MFC question as such but I wondered if anybody knew.
>>Basically, I was working on a (MFC)project where an ADO recordset is 
>>populated from an SQLServer table with a large range of date records. The 
>>idea was to get more than I need then use the Filter property to show just 
>>a limited set. The reason for this was to only have one SQL Server round 
>>trip to fetch all the records for likely timespans.
>>
>>Anyway I ran into trouble because the ADO Filter expects dates in local 
>>format. To cut a long story short I outputted the SQLServer date as a 
>>floating point number then convert the COleDateTime's also to float and 
>>filter based upon the floats. This works fine, although you have to take 
>>into account the different base date for the two data structures. 
>>SQLServer has a base date of 1st Jan 1900, which seems pretty reasonable 
>>to me. COleDateTime has a base date of 30th Dec 1899. OK the difference is 
>>2 so it doesn't really matter, but I'm struggling to think of a reason why 
>>that particular date was chosen.
>>
>>Anyone know why?
>>
>>Cheers 
> 
> 
> 
0
cpeters (15)
5/21/2008 8:10:57 PM
Doug Harrison [MVP] wrote:
> On Wed, 21 May 2008 20:57:55 +0200, Colin Peters <cpeters@coldmail.com>
> wrote:
> 
> 
>>Hello all,
>>Not really an MFC question as such but I wondered if anybody knew.
>>Basically, I was working on a (MFC)project where an ADO recordset is 
>>populated from an SQLServer table with a large range of date records. 
>>The idea was to get more than I need then use the Filter property to 
>>show just a limited set. The reason for this was to only have one SQL 
>>Server round trip to fetch all the records for likely timespans.
>>
>>Anyway I ran into trouble because the ADO Filter expects dates in local 
>>format. To cut a long story short I outputted the SQLServer date as a 
>>floating point number then convert the COleDateTime's also to float and 
>>filter based upon the floats. This works fine, although you have to take 
>>into account the different base date for the two data structures. 
>>SQLServer has a base date of 1st Jan 1900, which seems pretty reasonable 
>>to me. COleDateTime has a base date of 30th Dec 1899. OK the difference 
>>is 2 so it doesn't really matter, but I'm struggling to think of a 
>>reason why that particular date was chosen.
>>
>>Anyone know why?
> 
> 
> I think it ultimately has to do with Lotus 123, whose date format Excel
> copied, including the bug which considered 1900 to be a leap year. Consider
> this little program:
> 
> #include <afx.h>
> #include <ATLComTime.h>
> #include <stdio.h>
> 
> void print(double serial)
> {
>    COleDateTime d;
>    d.m_status = COleDateTime::valid;
>    d.m_dt = serial;
>    printf("%f = %s\n", d.m_dt, (LPCSTR) d.Format());
> }
> 
> int main()
> {
>    print(59);
>    print(60);
>    print(61);
>    print(62);
> }
> 
> Its output is:
> 
> 59.000000 = 2/27/1900
> 60.000000 = 2/28/1900
> 61.000000 = 3/1/1900
> 62.000000 = 3/2/1900
> 
> Looks fine. Now consider the same values in Excel:
> 
> 59	2/28/1900 12:00:00 AM
> 60	2/29/1900 12:00:00 AM
> 61	3/1/1900 12:00:00 AM
> 62	3/2/1900 12:00:00 AM
> 
> Again, 1900 was not a leap year, so Excel 2007 is still copying the Lotus
> bug and I suppose always will. Notice that the formatted COleDateTime
> values are one day less than the Excel values for serial numbers < 61, and
> that they agree for serial numbers >= 61; the COleDateTime does not
> incorrectly consider 1900 a leap year. So based on this, I'd guess that the
> designers of the OLE DATE type wanted to be compatible with Excel, but they
> didn't want to copy the Lotus bug, and they were willing to accept being
> incompatible with Excel for this small range of early dates. Given the
> popularity of Lotus 123 back in the day, the Excel designers no doubt felt
> they couldn't afford even this small degree of incompatibility.
> 

That makes sense. So the base date for Excel was 31 Dec 1899, 00:00 
a.m.? I wonder why the base date for SQL server is a day later....copied 
from Oracle?

BTW the original problem revolved around using the Filter property of an 
ADO recordset, and that the Filter date format isn't directly compatible 
with the SQL date format. My solution of comparing the dates cast as 
doubles (with the 2 day offset) had a little potential bugette. Namely 
that the Filter is a string whci I composed using the CString::Format 
method. This also uses local convention, so rather than getting 
"DateReal >= 32590.234 and DateReal <= 32595.123" I got "DateReal >= 
32.590,234 and DateReal <= 32.595,123" on a German OS. Which ADO won't 
parse correctly, IMHO. So it seems that ADO filter dates ought to be in 
local format, but other numbers not.

Thanks for your time Doug, that little conumdrum was going round my head 
for ages.



0
cpeters (15)
5/22/2008 6:59:10 PM
On Thu, 22 May 2008 20:59:10 +0200, Colin Peters <cpeters@coldmail.com>
wrote:

>That makes sense. So the base date for Excel was 31 Dec 1899, 00:00 
>a.m.? I wonder why the base date for SQL server is a day later....copied 
>from Oracle?

Who knows? I always liked the way Plauger concluded Chapter 15 in "The
Standard C Library":

Exercise 15.9 [Very hard] Devise a more orderly way to measure time. Get
somebody with some authority to agree to adopt it.

Seems like this was done multiple times, for many definitions of "orderly".
All kidding aside, all these methods are basically the same, and after
implementing the library time functions, I think he was wishing for a
system that did away with leap years, leap seconds, time zones, and
everything else that makes time programming so much fun.

>BTW the original problem revolved around using the Filter property of an 
>ADO recordset, and that the Filter date format isn't directly compatible 
>with the SQL date format. My solution of comparing the dates cast as 
>doubles (with the 2 day offset) had a little potential bugette. Namely 
>that the Filter is a string whci I composed using the CString::Format 
>method. This also uses local convention, so rather than getting 
>"DateReal >= 32590.234 and DateReal <= 32595.123" I got "DateReal >= 
>32.590,234 and DateReal <= 32.595,123" on a German OS. Which ADO won't 
>parse correctly, IMHO. So it seems that ADO filter dates ought to be in 
>local format, but other numbers not.
>
>Thanks for your time Doug, that little conumdrum was going round my head 
>for ages.

No problemo.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
5/22/2008 7:57:24 PM
On Wed, 21 May 2008 15:08:32 -0500, "Doug Harrison [MVP]" <dsh@mvps.org>
wrote:

>I think it ultimately has to do with Lotus 123, whose date format Excel
>copied, including the bug which considered 1900 to be a leap year. Consider
>this little program:
>
>#include <afx.h>
>#include <ATLComTime.h>
>#include <stdio.h>
>
>void print(double serial)
>{
>   COleDateTime d;
>   d.m_status = COleDateTime::valid;
>   d.m_dt = serial;
>   printf("%f = %s\n", d.m_dt, (LPCSTR) d.Format());
>}
>
>int main()
>{
>   print(59);
>   print(60);
>   print(61);
>   print(62);
>}
>
>Its output is:
>
>59.000000 = 2/27/1900
>60.000000 = 2/28/1900
>61.000000 = 3/1/1900
>62.000000 = 3/2/1900
>
>Looks fine. Now consider the same values in Excel:
>
>59	2/28/1900 12:00:00 AM
>60	2/29/1900 12:00:00 AM
>61	3/1/1900 12:00:00 AM
>62	3/2/1900 12:00:00 AM
>
>Again, 1900 was not a leap year, so Excel 2007 is still copying the Lotus
>bug and I suppose always will. Notice that the formatted COleDateTime
>values are one day less than the Excel values for serial numbers < 61, and
>that they agree for serial numbers >= 61; the COleDateTime does not
>incorrectly consider 1900 a leap year. So based on this, I'd guess that the
>designers of the OLE DATE type wanted to be compatible with Excel, but they
>didn't want to copy the Lotus bug, and they were willing to accept being
>incompatible with Excel for this small range of early dates. Given the
>popularity of Lotus 123 back in the day, the Excel designers no doubt felt
>they couldn't afford even this small degree of incompatibility.

FWIW, it looks like I guessed right. See:

http://www.inc.com/magazine/20080701/how-hard-could-it-be-glory-days.html

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
6/27/2008 3:19:05 PM
Very nice article!
Thank you, Doug!

Victor

"Doug Harrison [MVP]" <dsh@mvps.org> wrote in message 
news:b31a645bdhl1l55e8s88vdhefvbijai8ug@4ax.com...
> On Wed, 21 May 2008 15:08:32 -0500, "Doug Harrison [MVP]" <dsh@mvps.org>
> wrote:
....
> FWIW, it looks like I guessed right. See:
>
> http://www.inc.com/magazine/20080701/how-hard-could-it-be-glory-days.html
>
> -- 
> Doug Harrison
> Visual C++ MVP 


0
6/28/2008 3:09:53 PM
Reply:

Similar Artilces:

forms based authentication on exchange 2000?
Are there any third party add-ons that will enable forms based authentication for Exchange2000? Now that MSFT is disabling username:password@www.yourdomain.com in their latest IE security update, I have to find a workaround on the server side that'll let my users seamlessly authenticate to 1 particular common inbox on exchange via some method other than the standard pop-up dialogue box. If we can get passed the basic authentication requirement using some form of forms based authentication then I'll be able to seamlessly authenticate my users on exchange so they can access the data th...

Date and Time Picker Control problem
Hi, I've constructed a tool that employs multiple Userforms and several incidences of Date and Time Picker Controls (version 6.0). Amongst the group that use this tool there is one individual who gets the following message. "Could not load an object because it is not available on this machine". I've isolated this object to the Date Picker. I've checked Excel and Service pack version and they are the same as mine yet this individuals standard load does not seem to include this particular control. Is there any way of installing this control for the individual ...

Knowledge Base Import
Can someone direct me to the correct process and file structure to import Knowledge Base articles please. CRM 4.0. are you trying to import them as attachment (on note) ? if so what tool are you using? data migration manager? /Aamir Thank you. I am trying to import unique and seperate articles to the KB. Article template would originate in excel. Have tried to establish data map and to use wizard. Errror message says that "source data is not in the required format". "Aamir Bashir" wrote: > are you trying to import them as attachment (on note) ? if so what &...

COleDateTime Confusion
Using the code COleDateTime Date1( 2003 , 8 , 31 , 0 , 0 , 0 ); COleDateTime Date2( 2003 , 8 , 1 , 0 , 0 , 0 ); COleDateTimeSpan DateDifference = Date1 - Date2; sprintf( aux , "From %s to %s is %s days" , (LPCTSTR) Date2.Format( "%B %d %Y" ) , (LPCTSTR) Date1.Format( "%B %d %Y" ) , (LPCTSTR) DateDifference.Format( "%d" ) ); pdc->TextOut( 100 , currow - 2*rowHeight , aux ); the program displays that the difference is 29 days. My quick calculation usi...

From CDateTimeCtrl to COleDateTime, plz help me
Hey, I have a question about CDateTimeCtrl, I have a form-view with a CDateTimeCtrl control where the user can select a date (long format). Now i want to store the date the user selected in a COleDateTime object, how do i get the date from the CDateTimeCtrl into the COleDateTime variable? cheers, Paul "Paul Schouten" <vincent_schouten@yahoo.com> schrieb im Newsbeitrag news:42e21af6$0$97483$e4fe514c@news.xs4all.nl... > Hey, > > I have a question about CDateTimeCtrl, I have a form-view with a > CDateTimeCtrl control where the user can select a date (long fo...

How to add a Date
If I have 11/2/08 in A1, what formula would I put into A10 to get 12/2/08, etc? Thanks Try this: =3DA1 + 1 format the cell as a date. I assume your dates are in dd/m/yy format. Hope this helps. Pete On Oct 29, 4:02=A0pm, JimS <jim...@msn.com> wrote: > If I have 11/2/08 in A1, what formula would I put into A10 to get > 12/2/08, etc? > > Thanks One way =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)) Of course if you have 01/31/09 in A1 then you will get a date in March -- Regards, Peo Sjoblom "JimS" <jimx22@msn.com> wrote in message news:t72hg4pq4mfjuh97c...

SMTP incoming routing based on UserID..Urgent please...thanks in a
Hi, I have my requirement as follows: - I have a single domain called test.mail.biz i want that all my incoming e-mails should land to my exchange server. However, there are few "users" whose mailboxes are on a different non-exchange server. I have MX record and remote domain configured on SMTP host for normal domain based routing. Is there any method by which I can tell SMTP that any mails coming for user1@test.mail.biz should get relayed to some other server?rest of the users should get relay to my exchange mail server. Any help appreciated. Thanks again This might work: ...

date calculation #6
In one column cell A1 I have date (eg Feb -1-2009) in another(B1) I have 25( which represents number of days).How do get the date in the third column cell (C1) which will be equal to A1+B1. The answer should be in date (eg Feb-26-2009). Thanking you Afd On Feb 11, 7:35=A0pm, "afdmello" <afdme...@hotmail.com> wrote: > In one column cell A1 I have date (eg Feb -1-2009) in another(B1) > I have 25( which represents number of days).How do get the date > in the third column cell (C1) which will be equal to A1+B1. The > answer should be in date (eg Feb-26-2009). ...

Sorting based on IF statement *please help me!*
Hi I'm trying to create a macro which will sort a table 1st based on an IF statement and then by a due date. What I'm trying to do is sort the table so that any complete tasks (signalled by a "Yes" in the designated column) will be pushed to the bottom of the list and the most overdue to the top. My IF statement displays a True or False in a hidden column if the task is complete or not. Then I tried sorting by that column first and then the due date afterwards. That didn't work either though because the complete items are pushed right to the bottom of the sheet - leavin...

base currency
The currency in Turkey will be changed next year by dividing the existant currency by 1.000.000. How can I divide the amount of all of my transactions by 1.000.000 ? ...

Regions Bank e-pay dates
I have run into a payment date problem using e-pay in MS Money (Plus Deluxe) and Regions Bank. If I schedule an e-payment in MS Money that is more than one week in advance, it shows up on the Regions web site dated (approximately) one week *earlier*. If I try to schedule a payment less than one week in advance I receive the message that the date is too soon. Conversely, if I schedule a payment on the Regions web site and then update my online accouts in MS Money, the payment shows up in MS Money with a payment date one week *later* than the payment on the web site. I have tried creatin...

Get a percentage based on multiple conditions
I would like to determine a percentage in Excel that is based on multiple conditions. This is for a serious a products on different displays and the quantity on those displays. I need to know out of all the stores surveyed, what percentage of those stores had a lobby display with more than 150 cases. If I had a small set of data I'm sure I could just pivot the data a few ways and be done, but I have over 50,000 rows. See the sample set of data below for more detail. Store Display Product Qty ------- -------------- -------------- ---------- 123 Lobby Soda Cans 50 123 Aisle Soda Cans...

Date calc in Workflow
I need to add a wait condition to a workflow to a Case. I have a field "NSDA Date Submitted". If the case is still opened and that date is over 7 days ago I need to create an activity (Reminder to contact the NSDA). How do I create the wait? I want to do something like - "IF (NSDA Date + 7 Days) then send reminder" Is this possible?? -- Thank You, Robert Hi Rob, Sounds like you will need to create a system service which will store this reminder information. The problem is the reminder.. How do you trigger the workflow to fire a reminder.. Just throw your e...

Date calc limitations in Excel
Hi There, I've encountered a problem in the way that Excel calculates the perio between two dates. In particular if the first date is the start of th month and the second date is the last day of the month, Excel assume that this is an incomplete month. Therefore, if the period is rounde to complete months Excel will calculate the period as a month short. For example: 01-Apr-2003 to 31-Mar-2004 = 12 months However, Excel will calculate this as one day short of 12 months. Does anyone have a work-around for this? Thanks, Eamo -- Message posted from http://www.ExcelForum.com Hi To E...

knowlege base article 289815
How can i download this fix q289815.exe to solve the following problem Visio2000: Cross-Functional Flowchart Shapes Incorrectly Aligned When You Open Drawing Efe, The bottom of that article indicates that you need to contact PSS: "To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS" -- Dawn This posting is provided "AS IS&qu...

Server and Client based Rules in Outlook
HI, I created both Server and Client based rules in Outlook to respond to emails. The client based one is "if an email comes from a specific email, respond with a specified template". The server based one is "If an email comes from a specific email, respond with a message from the server". My issue is that these rules will only respond once to an email address, is there a way to have the rules respond to an email address no matter how many times it comes in? We can't use out of office assistant because those responses have been blocked from going ...

Countif and dates???
I have a 20,000 entry spreadsheet that contains dates in this format 07/04/2010, As you can imagine there are quite a few of these entries for each month. I want to count the number of them for a particular month. I can't seem to use wildcards for some reason and cant find the answer why on the net. There formula that I would expect to work goes like this: - (ps I am looking for all the March(03) entries in the column A) =COUNTIF(A:A, "*/03/8") This always returns a 0 and I can't see why? In an ideal would I would like this to count the above AND also ...

Filter Data based on Form
Hi All, I have a form that is based on a query. I also have a unbound list box that the user can select a location from. The Locations are Seattle, Bellevue and Redmond. When the user selects a location I would like the form to only display the records with those locations. This is a Single Form not a datasheet view and this is not a subform. Thanks Matt -- Matt Campbell mattc (at) saunatec [dot] com Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200712/1 I would use the listbox onclick event for this. Dim strSQL as String strSQL ...

Typing the date into Excel
Hi, and thanks in advance. I've recently updated from Excel 2003 to Excel 2007. I'm having a problem with entering dates: (1) I enter a date, say: 5/17/2009 or 5-17-2009 (2) The cell displays 0.000146 or -2021. (3) I format the cells as "date". (4) The cell displays as 1900/01/00 or ##### (indefinite) (5) The formula bar displays =5/17/2009 or =5-17-2009 (6) It doesn't matter if I format the cells as dates in advance or after entering the date. I'm guessing that there is a setup option somewhere that is wrong, but I can't find it. The documentation, and my ...

Outlook XP #30
I have encountered a problem with Outlook on my network. I autoarchive my emails daily to a store on my server. The problem is that if my server store is unavailable I get not only an error message but also a new 'Personal Folders' in my folders list. This new folder contain no data and it cannot be deleted either. How do I get rid of this folder? When my archiving works correctly I have an 'Archive Folder' in my folders list. Kevin See my reply to your post in microsoft.public.office.misc. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT ...

Text file to Google Base
Google requires that files bulk-oploaded to Google Base are formatted as either .txt or .xml. I have tried the first but so far with no success. One issue that might tease me is that Google require the file to be in Latin1 or UTF-8 coding. But how do I achieve this? As far as I can see this is not controllable when choosing a "Save as" "Text (tab delimited) (*.txt)" and in XP's regional settings there is no Latin1 or UTF-8. The error message I get from Google is not very helpful, it only says that I must choose the right format. I have tried to download a Google exam...

comparing dates that have difference formats
Hi using sql 2005. I have a datetime field that has a value like '2010-01-13 15:29:48.060'. I would use a where condition that does not include milliseconds. That is, I want the where condition to read something like... convert(varchar(20),dateAt,??)='2010-01-13 15:29:48' I have not yet got my head around using dates in select statements. So I'm hoping you can help me with this. Any ideas or recommendations appreciated. :-) Many thanks, Jonathan Try replacing ?? with 20 or 120. See here for a list of CONVERT function datetime formats. -- Thank...

delete item after date
I want to add an announcement section to a webpage announcing upcoming events but want to set a expiration date on the event so when it is over it will automatically be removed. "=?Utf-8?B?d2lsbGlhbQ==?=" <anonymous@discussions.microsoft.com> wrote in news:3DA63EE2-4AE1-4CEB-A211-F7413BA95057@microsoft.com: > I want to add an announcement section to a webpage announcing upcoming > events but want to set a expiration date on the event so when it is > over it will automatically be removed. > What is the connection between the webpage and Excel? -- My email a...

Calc date one year from today
Im trying to calculate a date range that will monitor warranty (364 days) from date of purchase order ?? Thanks for the help Ken Hi Ken! Use: =DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)-1) It will even cover the difference between Leap Years and non-Leap years which your 364 has a problem with. -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "Ken" <anonymous@discussions.microsoft.com> wrote in message news:11d0601c3f626$44145840$a301280a@phx.gbl......

Script for Query-Based DL's
Pardon me if posted in the wrong place. We are scripting a large amount of OU structures and administration groups with delegation through dsacls. This is something that is repeated many times. One item that is asked to create is a query-based DL. Since it would need to be ran so many times and for consistency I am trying to find if we can have the script create the Q-B DL's. I have found scripts for dsacls and the Q-B DL's but I'm having a hard time finding how to script the creation of the DL's. Does anyone know how this would be done? Thank you, Michael ...