Problem with "Task.StartDate" in Outlook.dll

Discussion in 'Bug Reports' started by JOTHA, Sep 12, 2008.

  1. JOTHA

    JOTHA Well-Known Member Licensed User

    I wanted to use the Outlook-function "Task", but there might be a bug in the Outlook.dll.

    The first problem is to use "Task.StartDate".

    If I use the sample-code from the help-file:
    Task.StartDate = DateParse("09/13/2008") + (TimeParse("08:00"Mod cTicksPerDay)
    the following message is shown:
    I tried also:
    Task.StartDate = DateParse("09/13/2008")
    with the same message ...
    Because of the Error-Messages I made some more experiments with the code, but nothing worked.

    If I use this:
    Task.StartDate = ("13.09.2008")
    ... this:
    Task.StartDate = (Date(Now))
    ... this:
    Task.StartDate = Date(Now)
    ... or I use this:
    Task.StartDate = "13.09.2008"
    The following message is shown:
    The next problem is to use the "Reminder-function" As specci48 has written to you yesterday (it is always at 08:00).

    All the time I thought it was my fault in programming, but now I think there must be a bug somewhere.

    But in the whole time I liked your Basic4PPC more and more, it is a great software and worth every cent! :sign0188:
    ... and the forum is also very very good! :sign0060: :)
  2. agraham

    agraham Expert Licensed User

    Task.StartDate = "13.09.2008"
    Have you reset DateFormat to the European format "dd/mm/yyyy"? With the default USA format of "mm/dd/yyyy" 13 is a month and so is invalid. That is a different error to your original one, which is displaying a default error message as you don't have the complete error message set installed.

    EDIT:- To see the actual message you need the German error message resource. The last post here might be what you need but I am not sure, it's for WM5.0 and WM6.0.
    Last edited: Sep 12, 2008
  3. JOTHA

    JOTHA Well-Known Member Licensed User

    Hello agraham,

    thank you for your help.

    I know the rules about the DateFormat in Europe (is written: ""), and I think this is not the reason for the error-messages, because I tried all formats (although the english/american ones).

    I will check out you link to the error-messages on the device, maybe it helps me for better understanding, what the error-message means.

  4. Erel

    Erel Administrator Staff Member Licensed User

    Please try:
    Task.StartDate = now
    Date(now) returns a string while StartDate expects a number (number of ticks).
    Did you install the error-messages cab?
  5. JOTHA

    JOTHA Well-Known Member Licensed User

    Hi Erel,

    thank you for helping me.
    Task.StartDate = now
    That´s a solution for the moment, but what can be done if you need a StartDate for "tomorrow" or in 3 weeks?

    Is there another solution?
  6. Erel

    Erel Administrator Staff Member Licensed User

    This code should work:
    Sub App_Start
        Task1.StartDate = DateParse(
    Msgbox("Date: " & Date(task1.StartDate))
    End Sub
    There is a mistake in the example from the manual.
    StartDate and DueDate resolution is whole days only. You can't change the time.
    Last edited: Sep 19, 2008
  7. JOTHA

    JOTHA Well-Known Member Licensed User

    Hi Erel,

    I´m sorry, but the code isn´t working proper.

    First I have changed the date format into "20.09.2008" (Europe). It works.

    If I use your code above, there are some Problems for the User on the Pocket-PC:

    1) You wrote: "You can change the time."
    But I can change it only in the code, but a User can´t change it on the Pocket-PC.

    2) Another problem is, when today (DueDate) is the 09/19/2008 (19.09.2008) and the StartDate is the 09/20/2008 (20.09.2008) = in the future, an error-message is shown:
    There should be a possibility for the user to put in the StartDate and the DueDate, also to set an Alarm. (This would be the best solution) ;)

    The "DueDate" function is working correct.

    Now I made this:
    Task.StartDate = DateParse(""&BeginnDatum.Text&"") + (TimeParse(""&BeginnUhrzeit.Text&""Mod cTicksPerDay)
    ... and the "StartDate" function is also working! (the Date- and Time-Fields must be TextBoxes, although it is not working!)

    So, only the "Alarm"-function is needed.

    Question to case 2) How can I avoid the error-message an show instead a messagebox like that: "Your Due-Date is set before the Start-Date. Please correct that ..."

    Thanks in advance!
  8. JOTHA

    JOTHA Well-Known Member Licensed User

    I did, but there is no other message as before.

    Do I had to reset the PPC after installing the CAB-File?
  9. Erel

    Erel Administrator Staff Member Licensed User

    There was a typo in my previous post. You can't change the time.
    You can use ErrorLabel to to catch the error.
  10. JOTHA

    JOTHA Well-Known Member Licensed User

    Thank you Erel.
    It works! :sign0060:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice