
Search In
The difference may seem very small but it makes a lot of changes in the ways things work.The year when written in small letters (setDateFormat:@"MM/dd/yyyy") is the ordinary calendar and will return normal year, but in case of the capital YYYY, (setD
We can change date format of a date as below:
Here, I have defined different date formats:
String FACEBOOK_DATE_FROMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZ";
String MESSAGE_DATE_FORMAT = "MM/dd/yyyy hh:mm a";
String MESSAGE_DATE_TIME_FORMAT = "MM/dd/yyyy
"Generic function to convert any type date to desired date format"
While working in a project, I got stuck in a issue in which I needed a generic function that converts the date string in any format to a desired date format.
Sometimes, you may have a long conditions to check for validity. In general, you may need to check certain thing that doesn't exists in checkit module, In that case you extends checkit module and add custom methods into it.
For ex.- To w
Issue while parsing string into DateTime:
Before starting lets have a look on the following code block.
Example:
string temp = DateTime.Now.Date.ToString("dd/MM/yyyy"); //( let the value be "20/05/2015")
DateTime dt = Convert.ToDateTime(temp);
In C#, we use a method DateTime.ToString(string) to get the value of a DateTime in specific pattern of string.
Syntax:-
public string ToString( string format )
It accepts one parameter "format" which specifies the date an
In SQL we have situations where we want to extract date from date time and in particular format
-- Extracting only Date from DateTime Type Column
SELECT N.[ID],N.[Message],N.[LocationID],N.[TargetUserID],N.[Url],CONCAT(U.[FirstName],U.[LastName])
Formatting Date in java:
There is a predefined format for dealing with dates in java , but suppose if you want the date in some other format other than the default one then you can use the SimpleDateFormat class of the java.text packa
Globalization (or Internationalization)
In IT industry, Globalization is also known as Internationalization. Globalization is the process of making a product multi-lingual or in multiple cultures/locales. It is the process of designing and developin
