Today's Date
Hi, How can i refer Today's Date in a formula so as the values would change every day based on that days date. For e.g. if its 09th june then the formula should give result as 09th june . The next day i.e. 10th june the value should get updated to 10th june. Is there any such functionality or formula available inside Anaplan. Please let me know ThankYou
Best Answers
-
Pavan,
There is a script available through Anaplan Connect that will allow the import of today's date into the model. This is the only way that the date can be updated throughout the model. There are no formulas that will enable that function to automatically happen.
If you are interested in that script, please let me know and I can get that to you.
Thank you!
Emily5 -
Hi Leo,
Here's the script that I've used that is setup to run as a .bat file. You'll need to just rename the .txt to .bat to convert it back.2
Answers
-
Emily
Would be great if you can point to / send this script to me. We are looking to solve a similar issue at one of our customers.
[quote]Emily DunnPavan,
There is a script available through Anaplan Connect that will allow the import of today's date into the model. This is the only way that the date can be updated throughout the model. There are no formulas that will enable that function to automatically happen.
If you are interested in that script, please let me know and I can get that to you.
Thank you!
Emily[/quote]0 -
Can I have this script as well?0
-
Can i have the script?thanks!
0 -
Could i have a copy of the script please. I have one currently but it is not reliable.
Thank you
1 -
@kfizz, @DeveloperCYT, @lmuladore, @bradley.sisson, and @Agandhi - I think I finally have what you might be looking for.
Attached is a Shell script that was recently tested for updating a current date. Let us know how this works out for you.
Special thanks to @greg_kajewski and @alec_judd!
7 -
Hi Emily,
Do you have the .bat version instead of .sh?
Thanks.
Leo
0 -
@alec_judd or @greg_kajewski - See Leo's question, please. Do you have a .bat available?
0 -
Thanks Greg!
0 -
Hi @greg_kajewski!
Thanks for the .bat file.
I have a question to get it running though:
It says to customize the following directory:
This variable AC_exe should be set to the path of the AnaplanClient.bat
set AC_exe=D:\Anaplan\AnaplanClient.batbut since Anaplan models are running completely web-based and there is no local client running I do not see how I can access this path. I have not a lot of technical know-how on how these things work, but if you could clarify a little it would be very helpful.
0 -
Hi Lukas,
When you download Anaplan Connect, it comes with a java based client. Therefore, the path is calling a small application within this download.Feel free to use this link to download Anaplan Connect and don't hesitate to reach out if you have any additional questions.
Thanks!
Greg0 -
Hi ,
Can you please share the script
0 -
This can be done in CloudWorks, without the need for batch/shell scripts. This particular use of CloudWorks is fairly simple.
1 -
how would you update the script above to include current date and time?
0 -
This is pretty technical example and assumes you have a Unix or Windows shell where you are running a script. Also this is just a quick reply because I have not reviewed that script above.
In Unix shell script syntax, this will capture system date and time into files, so it may help you to get started:
date "+%Y%m%d" >./date.txt
cat date.txtdate "+%H:%M:%S" >./time.txt
cat time.txtThis is a similar thing in a batch script:
:: set date and time variables
@SET ANAPLAN_YYYY=%DATE:~-4,4%
@SET ANAPLAN_MM=%DATE:~-10,2%
@SET ANAPLAN_DD=%DATE:~-7,2%
@SET ANAPLAN_HOUR=%TIME:~0,2%
@IF "%ANAPLAN_HOUR:~0,1%" == " " SET ANAPLAN_HOUR=0%ANAPLAN_HOUR:~1,1%
SET ANAPLAN_TIME=%ANAPLAN_HOUR:~0,2%%TIME:~3,2%%TIME:~6,2%
:: YYYYMMDD
SET ANAPLAN_DATE=%ANAPLAN_YYYY%%ANAPLAN_DD%%ANAPLAN_DD%
echo %ANAPLAN_DATE%echo %ANAPLAN_DATE% > date.txt
echo %ANAPLAN_TIME% > time.txttype date.txt
type time.txt:: sample
:: from set|more
:: ANAPLAN_DD=04
:: ANAPLAN_MM=06
:: ANAPLAN_YYYY=2019
:: ANAPLAN_TIME=1615381