Date & time calculation and result in a string

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1200
Joined: 23 Nov 2010
Has thanked: 699 times
Been thanked: 218 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: 6304
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 951 times
Been thanked: 1814 times

Re: Date & time calculation and result in a string

Postby TJ » 06 Mar 2012

arjfca wrote: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
These users thanked the author TJ for the post:
arjfca


Return to “MultiCharts”