Tags » Datetime

CRM 2015 Update 1: Store date and time values with or without time zone information

Until the previous release of CRM, all date and time values in CRM were time zone aware, including those with the Date Only format.

Use the new DateTimeAttributeMetadata.DateTimeBehavior property to store date and time values… 310 more words

Microsoft Dynamics CRM

Insert the Current Date/Time in Posts or Pages

Sometimes, you may want to display the current date or time inside one of your posts and pages and have it update dynamically every time the page is loaded. 140 more words


Maintaining Culture info when using -join on [datetime] objects

Another weird behaviour I’m at a loss to explain: I wrote a script that was designed to pull back certain attributes of AD objects. In some situations, it was possible to bring back more than one result with the query; in order to fit them into my exported CSV, I decided to use the -Join operator so that they would all fit on one row. 170 more words

Optimal way to remove time from Sql Date Time Column

As there is a separate data type [ date ] in sql server 2008 and on wards but still many ┬ádatabases are relying on sql server 2000 and sql server 2005 where data type is only datetime and in most of the cases we don’t require time so to remove time part from date developers use different techniques. 365 more words

Interview Question


Here is how to add to the default DATETIME_INPUT_FORMATS in Django settings.py:

# settings.py
from django.conf.global_settings import DATETIME_INPUT_FORMATS

DATETIME_INPUT_FORMATS += ('%Y-%m-%d %I:%M %p', )

Converting a string into a DateTime with an exact date format in C# .NET

How do you read the date “03-10-2014″? For some of you this will be October 03 2014. For others, especially those from the US this will be interpreted as March 10 2014. 147 more words


Getting the hour from a datetime string (T-SQL)

Often data is entered into the database as a string (varchar), when a more appropriate data type should have been applied.

Here’s a snippet of T-SQL for dealing with datetime data, stored as varchar, when what you really need is the hour. 126 more words