Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL: How to generate the system date/time
EGL: How to generate the system date/time [message #1736125] Sun, 26 June 2016 20:29 Go to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Hi,

I would like to generate the current date/time of the system with an EGL command like [%= current_time %] or [%= current_date %].
Is there any built-in type, function, or command to do this?

Best regards,
Alireza

[Updated on: Sun, 26 June 2016 20:30]

Report message to a moderator

Re: EGL: How to generate the system date/time [message #1736126 is a reply to message #1736125] Sun, 26 June 2016 20:40 Go to previous messageGo to next message
Bugra M. Yildiz is currently offline Bugra M. YildizFriend
Messages: 106
Registered: July 2014
Senior Member
Hello Alireza,

You can call Java methods in EOL modules. It can be a solution.
Re: EGL: How to generate the system date/time [message #1736129 is a reply to message #1736126] Sun, 26 June 2016 20:59 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Hi Bugra,

Thank you very much. Your suggested solution resolved my problem.

Regards,
Alireza
Re: EGL: How to generate the system date/time [message #1736130 is a reply to message #1736129] Sun, 26 June 2016 21:06 Go to previous messageGo to next message
Bugra M. Yildiz is currently offline Bugra M. YildizFriend
Messages: 106
Registered: July 2014
Senior Member
var javaDate = new Native("java.util.Date");
javaDate.toString().println("my EGL is starting: ");


You can use javaData as a variable and use it for other things except printing, of course.
Re: EGL: How to generate the system date/time [message #1736131 is a reply to message #1736130] Sun, 26 June 2016 21:45 Go to previous message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Dear Bugra,

Thanks a lot.

Regards,
Alireza

Previous Topic:Minor Bug in Epsilon Book (p. 32)
Next Topic:About temporary/on-the-fly (~) model attributes
Goto Forum:
  


Current Time: Fri Oct 19 10:03:09 GMT 2018

Powered by FUDForum. Page generated in 0.02333 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top