Malformed GUID in query expression

Posted on 2006-04-12
Last Modified: 2008-01-09

While interacting with SQL Server, the following date format works:

SELECT * FROM Alerts WHERE CreationDateTime > {ts '2006-04-12 10:00:00'} ORDER BY ID ASC

But it generates an exception when using Access with an OleDbConnection.

What is the corrrect time stamp format for Access?

Question by:ba272
    LVL 37

    Accepted Solution

    is this an actual sqlserver timestamp column? if so there is no corresponding type in access.
    LVL 37

    Expert Comment

    or are you looking for a date format which is ## delimited

    Author Comment

    Ok, I guess the problem is that I was attempting to incorporate a DateTime value into my query, since I had had favorable success doing so with SQL Server.  What's the next best thing in Access?
    LVL 12

    Expert Comment

    If you are generating your queries in code with parameterised SQL then you could just add a datetime type parameter to your query, and set its value to a datetime from your code.

    How are you generating your queries?

    LVL 96

    Assisted Solution

    by:Bob Learned

    Did you try it like this?

       SELECT * FROM Alerts WHERE CreationDateTime > '2006-04-12 10:00:00' ORDER BY ID ASC


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now