How to select records with today's event? I have a column that is set to smalldatetime. I need to select those that have a row of today's event.

Hi,

Simply use this example:

SELECT * FROM <TABLENAME> WHERE convert(varchar(10),<DATETIMECOLUMNNAME>,101) = convert(varchar(10),GETDATE(),101)

What does 101 means?

The 101 refers to the output format for the date conversion. You can see all the style values here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.