Questions tagged [date-conversion]

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".

688 questions
-2
votes
5 answers

Extract last day of the month from MMM(M)YYYY

How can I extract the last day of the month from dates like DEC2009, APR2013, AUG2008, NOV2017, JUL2014 etc. I've tried datepart, convert, cast, month, year and I keep getting in a mess with type conversion errors.
-2
votes
2 answers

Convert Wed Oct 14 08:00:00 CDT 2020 format to DateOnly and Time Only

We receive a csv file that has a column in this date format -- Wed Oct 14 08:00:00 CDT 2020, along with a column that has a count for each date/time I am using an SSIS package to grab the file and import this data into a sql table, then I can format…
-2
votes
1 answer

Convert Date Formats in pandas

I have a data frame: print(df_test) Name Birth Date 0 Anna B Wilson JUL 1861 1 Victor C Burnett NOV 1847 2 Ausia Burnett JUN 1898 3 Alfred Burnett MAR 1896 4 Viola Burnett AUG 1894 I would like the output…
fredh3
  • 13
  • 3
-2
votes
3 answers

how to convert file name from abc_10072019.txt to abc_20191007.txt using power shell or batch script

How to convert date format in the filename using PowerShell or batch script For example: abc_10072019.txt to abc_20191007.txt
-2
votes
1 answer

How to convert a date format: 2019-08-22 16:16:08] to the format: aammjjhhmmss in C language

I need to convert this date : 2019-08-22 16:16:08 to this specific form: aammjjhhmmss (aa for 'année' or year; jj for 'jour' or day). I'm working with C language. This is my code. I don't find it good because I need to call the function three times…
Alma
  • 31
  • 1
  • 10
-2
votes
1 answer

Converting dates with multiple formats in a CSV file

I have a CSV full of tweets containing a few headers. Among them, for some unknown reason, the date format changes midway from %Y-%m-%d to %d/%m/%Y as shown in the image below. This makes it difficult when trying to export it into another program…
-2
votes
2 answers

DateTime("2019-02-16T10:00:00+08:00") conversion to local date time with offset value

I get the datetime content in the below string format with offset time value from the source system. 2019-02-16T10:00:00+08:00 Where i want to convert that into local date time using the offset value.I tried the below, but not getting the expected…
furisuri
  • 1
  • 1
-2
votes
3 answers

SQL Server discriminates between seemingly equal date strings and throws conversion error

After importing date strings in dd.(m)m.yyyy format from .csv I don't seem to be able to convert them into dates. Using CONVERT (date, DATE_COLUMN, 104) causes an error: Conversion failed when converting date and/or time from character…
-2
votes
1 answer

Issue in converting to specific Date format in JAVA

i am receiving following date in form of String : "Wed Feb 06 2019 16:07:03 PM" which i need to convert it in form "02/06/2019 at 04:17 PM ET" Please advise
user3657868
  • 59
  • 1
  • 9
-2
votes
2 answers

Convert 24 hour datetime to 12 hour format without using string

I need to convert the datetime that is 24 hour format, and have to show it as 12 hour format. I got answers as , convert it into string as 12 hr format and show as string. But I need to show as date time format. So i have used…
Riyas
  • 475
  • 1
  • 8
  • 27
-2
votes
1 answer

SQL Converting to HH:MM:SS with an equation - Not working Correctly

I am trying to minus the sum of one column from the sum of another column in seconds, and then convert it into HH:MM:SS. The conversion however requires it to be able to go over 24 hours as this is a sum time. My conversion works on single columns…
-2
votes
1 answer

Convert string '01May2001' to date in python 2.6?

How to convert string '01May2001' to date in python 2.6? Thanks
Pankaj
  • 41
  • 1
  • 4
-2
votes
3 answers

I want to change date format with given time zone. I have tried it with SimpleDateFormat but still failed

The date is Wed Jun 21 14:14:23 GMT+08:00 2017 and I want to convert it into 2017-06-21. Here is my code: String date = "Wed Jun 21 14:14:23 GMT+08:00 2017"; SimpleDateFormat sdf = new SimpleDateFormat("EEE MMMM dd HH:mm:ss…
Manpreet Singh
  • 1,048
  • 7
  • 7
-2
votes
3 answers

How to convert dd-mm-yyyy Format to MM/dd/yyyy in C#?

I am trying to convert string dd-mm-yyyy to MM/dd/yyyy. I have tried different ways but nothing worked. My current logic is: string convertDate = DateTime.ParseExact(date, "dd-mm-yyyy", CultureInfo.InvariantCulture) …
John Adam
  • 220
  • 2
  • 14
-2
votes
2 answers

Convert date time to day zero php

one question to converting datetime type from mysql which range starts from 1001-01-01 00:00. Problem is the day starts from 1 day but I would like to have it from 0 days. When I subtract day with -1 I get day 30. $data['duration'] = date('d -…
marhyno
  • 677
  • 1
  • 8
  • 20