How to format Date[N] in screener results

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #170324 quote
    HansLatour
    Participant
    New

    How can I format the Date[N] variable in a column of the screener.
    It ‘translates’ YYYYMMDD’ to a numeric value.

    #170340 quote
    robertogozzi
    Moderator
    Master

    IT IS a numeric value. ProRealTime only supports floating point numeric data,

    A date is usually displayed, with DrawText, as 20M (20 million).

    You can try to remove the two leftmost digits (20), with this trick, so that 20210526 is abridged to 210526, but it will be reported with the thousands separator and, for years 0 to 9 the leading 0’s will be dropped (not tested):

    x      = round((date / 1000000) - 0.5)
    y      = x * 1000000
    MyDate = date - y
    #170361 quote
    HansLatour
    Participant
    New

    Hi Roberto, thanks for your solution, works great!

    I created a millennium-bug by taking a shortcut to your code by just subtracting 20000000 🙂

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

How to format Date[N] in screener results


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
HansLatour @hanslatour Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by HansLatour
4 years, 9 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 05/25/2021
Status: Active
Attachments: No files
Logo Logo
Loading...