Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:59:16+00:00 2026-06-12T19:59:16+00:00

In a data.frame, I have a date time stamp in the form: head(x$time) [1]

  • 0

In a data.frame, I have a date time stamp in the form:

head(x$time)
[1] "Thu Oct 11 22:18:02 2012" "Thu Oct 11 22:50:15 2012" "Thu Oct 11 22:54:17 2012"
[4] "Thu Oct 11 22:43:13 2012" "Thu Oct 11 22:41:18 2012" "Thu Oct 11 22:15:19 2012"

Everytime I try to convert it with as.Date, lubridate, or zoo I get NAs or Errors.

What is the way to convert this time to a readable form?

I’ve tried:

 Time<-strptime(x$time,format="&m/%d/%Y  %H:$M")
    x$minute<-parse_date_time(x$time)
    x$minute<-mdy(x$time)
    x$minute<-as.Date(x$time,"%m/%d/%Y %H:%M:%S")
    x$minute<-as.time(x$time)
    x$minute<-as.POSIXct(x$time,format="%H:%M")
    x$minute<-minute(x$time)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:59:17+00:00Added an answer on June 12, 2026 at 7:59 pm

    What you really want is strptime(). Try something like:

    strptime(x$time, "%a %b %d %H:%M:%S %Y")
    

    As an example of the interesting things you can do with strptime(), consider the following:

    thedate <- "I came to your house at 11:45 on January 21, 2012."
    strptime(thedate, "I came to your house at %H:%M on %B %d, %Y.")
    # [1] "2012-01-21 11:45:00"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following data frame: id<-c(1,1,1,1,1,3,3,3,3) period<-c(calib,calib,calib,valid,valid,calib,calib,calib,valid) date<-c(11-11-07,11-11-07,23-11-07,12-12-08,17-12-08,11-11-07,23-11-07,23-11-07,16-01-08) time<-c(12,13,14,11,23,15,12,18,14) df<-data.frame(id,period,time,date) df$date2<-as.Date(as.character(df$date), format =
I have a data.frame with multiple time series vectors against a date:time vector. I
I have a time series data: output of x data frame: Date vol 1990
I have a date column in a data frame in chr format as follows:
I have a data frame of daily data: df with four columns: Date, A,
I have following data frames > head(elo) date elo 1 1921-12-18 1597 2 1922-05-14
I have a data frame containing multiple time series of returns, stored in columns.
I have a data frame like this Date Team Score 1/1/2010 A 10 1/1/2010
I have two data.frame s in R , each indexed by date. One is
i have a time series data like this: x <- structure(list(date = structure(c(1264572000, 1266202800,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.