join variable values

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #157235 quote
    Grantx
    Participant
    Average

    Is there a way to join date time values together? eg

    mydateopen = OpenDate + OpenHour

    mydateopen = OpenDate & OpenHour

    Neither of these work. For each day I have specific session times so need that days first bar opening time and last bar closing time.

    #157243 quote
    robertogozzi
    Moderator
    Master

    Try that on a pocket calculator:

    OpenDate  20200110 + Jan.10th
    OpenHour               23 = 11pm
    .                    20200133 =Jan.33rd

    Your second example uses a logical operator with numbers, can’t work!

    #157250 quote
    Grantx
    Participant
    Average

    ok, so no way to concatenate?

    Is there tostring() functionality or similar?

    #157253 quote
    robertogozzi
    Moderator
    Master

    No, they are considered as numbers, so you need to shift them by multiplying them.

    Adding, say, 1 year to a date is possible, but you have to multiply 1 by 10000 to skip days and months:

    date  20210111 +
    year         10000 =
    .          20220111

    Grantx thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

join variable values


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Grantx @grantx Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
5 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/10/2021
Status: Active
Attachments: No files
Logo Logo
Loading...