Skip to Content

Local Date and Time to local Timestamp

Hi,

I wanted to convert factory start date and time of a task into local factory timestamp.

I tried below, but it outputs UTC timestamp. But I need local timestamp.

convert date lv_local_start_date time lv_local_start_time into time stamp LOC_ST_TMSTMP time zone <fs_wa_plant>-tzone.


TZONE comes from plant attribute of factory calendar. For example for switzerland it is 'CET'.

But below works somehow, .....UTC Timestamp to local date and time.

CONVERT TIME STAMP lv_start_utc_tstmp TIME ZONE <fs_wa_plant>-tzone INTO DATE lv_local_start_date TIME lv_local_start_time.

I don't want direct UTC timestamp to local timestamp though. I am deriving local date and time from UTC timestamp, converting to factory date and time and then that converting to local factory timestamp.

A direct conversion from UTC timestamp to factory timestamp could work though.

Regards,

Cleo

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 24, 2017 at 03:50 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 25, 2017 at 09:27 AM

    So, is there a function module that given input begin date and time and end date and time, gives the difference in seconds?

    Add comment
    10|10000 characters needed characters exceeded