Skip to content

Working with date-time format, cant handle POSIXct. (Error in as.POSIXlt.numeric(x) : 'origin' must be supplied) #58

Open
@caglajf

Description

Hello,

I have a date-time column in my database in a format of "2017-01-02 8:27" as example. I want to add 10 minutes to this date-time version.

dat$EventTime=as.POSIXct(strptime( dat$EventTime, "%Y-%m-%d %H:%M"), tz = "", origin = '1970-01-01 00:00')

##date-time format becomes 2017-01-02 08:27:00 which is ok, however when I try to add 10 minutes

dat$EventTime[1]+minute(10)

I come across with this error

Error in as.POSIXlt.numeric(x) : 'origin' must be supplied

Could you please help me with that issue?

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions