Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Date format

1 REPLY 1
Reply
Message 1 of 2
SharkDesign
4288 Views, 1 Reply

iLogic Date format

I have a major problem with the date string in iLogic, Inventor 2011. 

= DateString

It returns the date with the month before the day (mm/dd/yyyy), something only useful in the Americas.

This is regardless of region settings in control panel.

 

Is there a way to return the date as dd/mm/yyyy ?

 

 Thanks

 

  Expert Elite
  Inventor Certified Professional
1 REPLY 1
Message 2 of 2
jeff.pek
in reply to: SharkDesign

Instead of using DateString, a built-in VB function, which always uses MM/DD/YY format, try using "DateTime.Now.ToString()" instead. This takes an optional parameter to control the format of the string.

 

For example:

  DateTime.Now.ToString("d") generates "7/17/2010" in the US, and should use a format appropriate for your system locale. The ToString method supports full customization of the date string, per:

 

http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx

 

Jeff

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report