Conversion of dates from one calendar or notation to another, for example, converting Julian calendar February 29, 1700 to Gregorian calendar March 11, 1700, or "March 11, 1700" to "1700-03-11".
Questions tagged [date-conversion]
688 questions
7
votes
4 answers
R package constructing time objects from date and hour(integer)
I have data provided in the form of a date telling the day (format "YYYY-MM-DD", e.g. "2015-03-11" and the hours of the day numbered (0-23).
What is the most convenient way to produce time objects of the form
"2015-03-11" and hour = 0 -> …

Richi W
- 3,534
- 4
- 20
- 39
7
votes
2 answers
SQL date format conversion from INT(yyyymmdd) type to date(mm/dd/yyyy)
I have a table with datekey column values(20120728,20120728...) in format of yyyymmdd as int type, I need to make them into date format of mm/dd/yyyy while writing select statement.

user2963607
- 71
- 1
- 1
- 2
7
votes
4 answers
Convert Date String to another Date string with different format
I need to convert an string date with format yyyyMMdd to a date string with format MM/dd/yyyy. Which is the best to do it?
I'm doing this:
DateTime.ParseExact(dateString, "yyyyMMdd", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy")
But I'm not…

Müsli
- 1,744
- 7
- 27
- 50
6
votes
6 answers
Why does strtotime give different result in different timezone?
I am not sure why strtotime() in PHP returns different result in different timezone even though same date is given as parameter, does anyone know the answer? I also want to know, can I do similar task (converting a datetime to an int to do…

Muhammad Usman
- 12,439
- 6
- 36
- 59
6
votes
3 answers
How to Convert a Date time value with UTC offset into GMT in java 7
I have a date time value 2016-12-21T07:48:36 with an offset of UTC+14. How to convert the datetime into equivalent standard GMT time.
I tried with sampleDateFormat.parse() method.But, I am not able to get the TimeZone object for UTC offset like.…

GOPI
- 71
- 2
- 3
- 8
6
votes
2 answers
C# - Best way to convert Month names to their month number
Is there a function in C# that can already change a Month name to it's corresponding month number? If not, should I make a method (like using 'Switch" or some loop function) that makes this possible?
I'm asking because I would like to have clean…

Tscott
- 465
- 6
- 21
6
votes
1 answer
How to print Nepali date today in PHP?
i want to echo print nepali calendar date on different date formats.
please take a look at bellow code
And there is a jquery date picker for this:
http://sajanmaharjan.com.np/my-works/nepali-datepicker-ui/
Now, all i want is to print 2070-10-21 as…

Suman KC
- 3,478
- 4
- 30
- 42
6
votes
2 answers
Is it possible to represent non gregorian dates as DateTime in .NET?
I'm having trouble representing Persian (Solar Hijri Calendar) dates as DateTime in C#, specifically on certain days of particular months, for example 31/04 where in the Gregorian calendar such a date is…

Mohammad Sepahvand
- 17,364
- 22
- 81
- 122
5
votes
2 answers
Convert XMLGregorianCalendar in GMT to LocalDateTime Pacific time
I'm trying to convert XMLGregorianCalendar which is sent in GMT/UTC format to Java 8 LocalDateTime in America/Los_Angeles timezone with no luck.
Here is what I tried and couldn't get the time converted to Pacific time.
//xmlDate is…

Ram
- 1,743
- 2
- 18
- 40
5
votes
1 answer
Moment js utc conversions not working as expected, behind date object value
I am trying to convert a particular date to utc(save it in db) and after fetching it show it as local time. When I use moment there is always a half an hour delay as compared to js Date object,any idea why?
Date is 8th May 2016, browser timezone is…

wallop
- 2,510
- 1
- 22
- 39
5
votes
3 answers
Conversion failed when converting date and/or time from character string in SQL SERVER 2008
I have below SQL.
UPDATE student_queues
SET Deleted=0,
last_accessed_by='raja',
last_accessed_on=CONVERT(VARCHAR(24),'23-07-2014 09:37:00',113)
WHERE std_id IN ('2144-384-11564')
AND reject_details='REJECT'
when I ran the…

Rithik_Star
- 651
- 5
- 14
- 39
5
votes
4 answers
Convert Between Datetime Formats Using Perl
We're currently using a 3rd party API that provides datetime in the following format:
Sat Mar 06 09:00:00 ICST 2010
Fri Feb 19 19:30:00 JDT 2010
Fri Feb 19 19:30:00 PST 2010
However, we want to store these datetime objects in MySQL in a standard…

Russell C.
- 1,649
- 6
- 33
- 55
5
votes
1 answer
Convert From Hijri to Georgian date in ASP & C#?
I have two text boxes, One in Hijri Date which I am inserting date in this text box using the calender extender. What I want is that upon selection of date (Hijri Date), the Georgian text box will filled with converted Georgian date using C#.
Does…

AbdulAziz
- 5,868
- 14
- 56
- 77
5
votes
2 answers
Formatting Date with PHP from weird twitter format
Through the twitter API I was able to get the datetime of when something was tweeted
Jul 25 17:42:55 +0000 2013
Now, in PHP, how do I get that into standard unix:
2013-6-25 17:42:55
I'm not to sure on anything to deal with datetime but I think…

Joel Werner
- 103
- 1
- 8
5
votes
2 answers
SQL convert string to date format 112
I have an input date and I need to convert it to format 112 (yyyymmdd) for use later on in my SQL statement.
declare @day varchar(10)
set @day = '6/21/2013'
select @day
I've done this before...IDK if it's because I'm on SQL 2000 for this project…

McG369
- 192
- 1
- 2
- 8