date-formatting

SQL Server Datetime issues. American vs. British?

Hi Guys On my test DB, the dates are displayed in a DD/MM/YYYY format. By displayed I mean when you right click, open table in Management Studio, the returned data are displayed in a DD/MM/YYYY format. Funny thing is, when I write T-SQL to retrieve records, I have to input a MM/DD/YYYY format to get back the right data. Is there anyway...

Convert to dd/mmm/yyyy

I am retrieving date from MySQL in the format yyyy/mm/dd 00:00:00. I want to convert this date into format dd/MMM/yyyy in PHP. How to do this? ...

Date formatting using data annotations for a dataform in Silverlight

This is probably got a simple answer to it, but I am having problems just formatting the date for a dataform field.. <df:DataForm x:Name="Form1" ItemsSource="{Binding Mode=OneWay}" AutoGenerateFields="True" AutoEdit="True" AutoCommit="False" CommitButtonContent="Save" CancelButtonC...

Getting date string from getdate method

Hi, I need date string using sql statement like.. select getDate() this will return 2010-06-08 16:31:47.667 but I need in this format 201006081631 = yyyymmddhoursmin How can I get this? Thanks ...

Making a PHP/MySQL Timestamp look more attractive

Hello there! So basically, I'm currently selecting a Timestamp from my MySQL database. In the database, the timestamp looks like so: 2010-06-30 12:36:08 Obviously for a webapp, that's not very attractive for users to view. So, using some CodeIgniter functions, I made it look a bit nicer. <h4 class="timestamp"> <?php // Quickly c...

How to format time since xxx e.g. “4 minutes ago” similar to Stack Exchange sites

The question is how to format a JavaScript Date as a string stating the time elapsed similar to the way you see times displayed on Stack Overflow. e.g. 1 minute ago 1 hour ago 1 day ago 1 month ago 1 year ago ...

How do I get my Python date in the format that I want?

I'm reading a date from an Excel cell in Python (using .Value on the cell)... the result that I get is: 07/06/10 00:00:00 I thought this was a string, and so went about trying to figure out how to convert this to the format I need ("yyyyMMdd", or "20100706" in this example). However, after some playing around I realized that it is not...

Human-readable, current time sensitive date and time formatting in PHP

Hi, Is there a painless way to convert unix timestamps, MySQL timestamps, MySQL datetimes (or any other standard date and time format) into strings in the following form: Today, 6:00pm Tomorrow, 12:30pm Wednesday, 4:00pm Next friday, 11:00am I'm not sure what to call these - I guess conversational-style, current time sensitive date ...

sqlite timestamp formatting

Hi all. I am trying to work with dates in an sqlite database. I am storing my dates as timestamps, but when I use strftime() to format them to human readable dates I am getting back unxpected results. Condider the following, I select the current timestamp: SELECT strftime("%s","now"); 1281353727 Then I try to format a date using th...

Format date like: Monday, 1st March

Seems like it should be simple enough but it's driving me up the wall. I've looked at the python date formatting strings and it still doesn't make too much sense. Here's what I'm trying to do: <Full day>, <Day of month><Ordinal> <Month> Where <Ordinal> is st, nd, rd, th, etc depending on the day. ...

Parse this date in Python: 5th November 2010

I'm having a bad time with date parsing and formatting today. Points for somebody who can parse this date format into a datetime.date or datetime.datetime (I'm not too fussy but I'd prefer .date): 5th November 2010 ...

python datetime help

Hi, I have a big search field, where users could type in any peice of text and it would search for it. Now I have a requirement to add in dob to my search. I am not adding a new textbox with a dob picker. I just want users to be able to input a dob in a range of formats and it would figure it out. IE users can search using any combin...

Recommended date format for REST API

Hi - I'm writing a app that exposes a REST API. Some of the query parameters will be date/time (accurate to second), and some of the responses will be timestamps (accurate to millisecond). The API implementation on the server is in Java. The client apps can be anything - java, javascript, .NET. The API returns XML or JSON data. Date/T...

Using NSDateFormatter to format date to local date

I have tried numerous attemps of formatting a relatively simple date format to a date object, but also converting to my local time zone. All dates are formatte like this: 2010-09-11T08:55:00. This is GMT time, and I want it converted to a date object with GMT+2. Can anyone please point me in the right direction? ...

How do I format a Date in Flash?

I could be overlooking something, but Flash / AS3 seems to be missing basic date formatting functionality. How do I get a formatted string from a Date ? There's a few options like .toLocaleDateString() and .toUTCString(), but that a bit limiting, to say the least. So, how do I format a Date object in AS3? ...

PHP: Date format conversting string 2010-09-02T09:46:48.78 to dd/mm/yyyy

Hi, I am pulling a date string from an API. The returned string looks like this: 2010-09-02T09:46:48.78 I want to convert it to 02/09/2010 (dd/mm/yyyy) but date_format($note['createdate'], "d/m/Y") Results in error: Warning: date_format() expects parameter 1 to be DateTime, string given in Can someone steer me in the right dir...

Convert datetime in sql server....

How can i convert the datetime format below 2010-10-25 11:13:36.700 into 25-Oct-2010 or 2010-10-25 00:00:00.000 ...