Date criteria in Views

  • Hello again.

    I'm currently creating a view that will display data that is equal to or after todays date. I have no idea how to code this in the criteria field in the view or how to refer to todays date. Can anyone offer me any advice on this ?

     

    Thanks in advance,

    Mitch.....

  • WHERE DateField >= CONVERT(VARCHAR(10), GETDATE(), 101)



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Thanks AJ.

    I have one other question, regarding a time field. I was using a time field as a datetime type but have now switched it to smalldatetime because i'd like to format it as 12:00 but changing the formula to HH:NN as advised by books online does'nt work. In Access I would have the format as HH:MM but of course i'm going to have to forget my old Access ways.

    So please tell me how do I go about haveing mt Time field write and display as a hh:mm style ?

    Regards,

    Mitch....

  • CONVERT(VARCHAR(5), GETDATE(), 108) = HH:MM  I think this should work for you



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply