#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Datetime problem


    I have an sql statement that reads...
    SELECT * FROM EventCalendar WHERE department=3 and startdate > '23/11/2012 9:00:00 a.m.'

    eventcalander is created as....
    see image at lucenz.co.nz/data2.jpg

    With the following data in it...
    see image at lucenz.co.nz/data1.jpg

    now the problem, I get no results. If I change the > for a < then i get results but of course not the ones I am actually after. I must have something wrong but what is it?
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,911
    Rep Power
    1045
    Hi,

    are you sure you got your datetime syntax right? Maybe there's a special localization feature I'm not aware of, but as far as I know the literal is
    Code:
    YYYY-MM-DD HH:MM:SS
    (with some variations)

IMN logo majestic logo threadwatch logo seochat tools logo