ikodan Posted July 5, 2016 Report Share Posted July 5, 2016 Hello, I can have the current year to text variable, but I don't find the way to have it to decimal... Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 5, 2016 Report Share Posted July 5, 2016 I'm not really clear what you mean. If you have the year as a text variable tYear then you can simply convert it to a decimal variable dYear: Variable Set String %tYear% to "2016" Variable Modify String %tYear%: Convert to Decimal (%dYear%) Text Box Display: Result Or do you mean you want to convert the current Date (not year), as in this command? Convert Date/Time to Decimal: %dtCurrentTime% => %dCurrentTime% Here's an extract from ME Pro's excellent Help: Convert Date/Time to Decimal Variable This option converts a Date/Time variable to a decimal value representing the date/time. The value is then saved to a Decimal variable. Create a Date/Time variable through the Variable tab in the Script Editor or through the Date/Time command. Script Editor > Expand Variables Category > Convert Date/Time to Decimal Date/Time Variable to Convert Select the Date/Time variable to convert to a Decimal variable. Decimal Variable to Receive the Result Select the Decimal variable to store the value of the converted Date/Time variable. Example: Below is a sample date and time saved to a Date/Time variable: 4/25/2011 11:00:05 AM The Date/Time variable value above converts to the decimal value shown below: 40658.4583938773 The first 5 digits represent the date. The decimal section, to the right of the period, represents the time (or fraction of a day). -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.