Date & time calculation and result in a string

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Date & time calculation and result in a string

Postby arjfca » 06 Mar 2012

Hello

I'm lost in the date & time calculation. Any help appreciated

I want to add a time value to a time variable

Ctime = 235900 // 23:59:00
Cscale = 175 // 175 seconds 1 minute: 55sec

Ctime = Ctime + Cscale C time should equal 0000155 + 1 day

- How do we calculate date and time to get a value representing both
- How can I format the ending date and time string like (YYYYMMDD HH:MM:SS)

Any help appreciated

Martin

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Date & time calculation and result in a string

Postby TJ » 06 Mar 2012

Hello

I'm lost in the date & time calculation. Any help appreciated
see post #3
viewtopic.php?f=1&t=9135&p=43233

I want to add a time value to a time variable

Ctime = 235900 // 23:59:00
Cscale = 175 // 175 seconds 1 minute: 55sec

Ctime = Ctime + Cscale C time should equal 0000155 + 1 day

- How do we calculate date and time to get a value representing both
- How can I format the ending date and time string like (YYYYMMDD HH:MM:SS)

Any help appreciated

Martin
look up

FormatDate


Return to “MultiCharts”