Author Topic: New date variable  (Read 3633 times)

  • All members
  • Posts: 42
New date variable
« on: 05 Feb 2021, 12:15 »
Hi team,

We have a variable now_time_datestr which return the date in the format dd/mm/yyyy.

Could we have a variable that reverses that, without the slashes as well. So in the format yyyymmdd. This would really help with sorting files etc into date order.


  • Administrator
  • Posts: 8826
  • Gender: Female
Re: New date variable
« Reply #1 on: 09 Feb 2021, 16:55 »
I'm sorry, there is no quick solution for this, as somebody else would want this in yyyy-mm-dd format or, etc. Unfortunately, this is not a full-fledged programming language, so we can't afford this level of flexibility.

You could maybe use the variable as is and later just remove the slashes using some third-party software?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 33
  • Gender: Male
Re: New date variable
« Reply #2 on: 10 Feb 2021, 21:53 »
Possible workaround: If having the date in the filename doesn't matter and you just want the files in date order, then using 'now_time' instead of 'now_time_datestr' would do this - file names would run from lowest number (oldest log) to highest (newest log), with the number increasing by 1 each day. Assuming you're taking the logs into excel then you can get the actual date in the log by applying custom formatting to the cell with the 'now_time' value.

  • All members
  • Posts: 42
Re: New date variable
« Reply #3 on: 11 Feb 2021, 11:46 »
No problem Oxa, I wasn't sure how the variable now_time_datestr variable was built. I thought it might formed by already having the year, month and day as separate values. Thanks for getting back to me.


I think you're on to something here. Using now_time by itself wouldn't work as each entry would be a different file and I want just one file per day. If I use INTEGER(now_time) however, I think this'll do what I'm after. Thanks for pointing me in the right direction.



Please note, BetFair is seems to be currently OFFLINE