Skip to main content

Mehdi Anis

Member since Dec 11, 2008

Recent Blog Comments By Mehdi Anis

  • Getting Only the Date Part of a Date/Time Stamp in SQL Server

    Posted on Oct 17, 2006 at 4:11 AM

    Ok, I beleive in you :: DATEPART is the Savior. Whatever I do to a DATETIME field, in .NET application it automatically adds 00:00:00 for the time. Ofcourse, we can use client side programming function to convert the DateTime data type to To String() type (From my .NET experience). OR, use DATEPART... read more »

  • Getting Only the Date Part of a Date/Time Stamp in SQL Server

    Posted on Aug 15, 2006 at 11:01 AM

    I am using MS SQL 2005 Server I tried BEN's way and the other 'best' way = CAST(DATEADD(DAY, 0, GETDATE()) AS DATETIME) But none of them works. I am developing a VB .NET application. I think I have to use the .SubString(0, .IndexOf(" ") function to get the DATE only part. It's slow, but haven't... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel