.NET

.NET

Reply
Contributor
Amrit.shr
Posts: 13
Registered: ‎03-14-2011
Message 1 of 6 (624 Views)
Accepted Solution

how to change GetVariable("tdcreate") to date format

624 Views, 5 Replies
03-11-2012 04:32 PM

hi

i am useing vb.net 2010

        Dim AcadApp As Autodesk.AutoCAD.Interop.AcadApplication
        Dim acaddoc As Autodesk.AutoCAD.Interop.AcadDocument
        AcadApp = GetObject(, "Autocad.Application")
        acaddoc = AcadApp.ActiveDocument
        Dim DD As Double
        DD = acaddoc.GetVariable("tdcreate")

 

 

how to convert DD value to date and time format

 

any suggestion will be great.

 

Thanks in advance.

Valued Mentor
KerryBrown
Posts: 278
Registered: ‎11-29-2008
Message 2 of 6 (620 Views)

Re: how to change GetVariable("tdcreate") to date format

03-11-2012 05:16 PM in reply to: Amrit.shr

 

 

http://lmgtfy.com/?q=julian+date+converter+C%23+VB.net

//-------------------------------------------------------

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

*Expert Elite*
Keith.Brown
Posts: 1,237
Registered: ‎03-13-2008
Message 3 of 6 (610 Views)

Re: how to change GetVariable("tdcreate") to date format

03-11-2012 06:53 PM in reply to: KerryBrown

Nice link Kerry.  Is amazing to me what type of websites people think up.


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!
Valued Mentor
KerryBrown
Posts: 278
Registered: ‎11-29-2008
Message 4 of 6 (598 Views)

Re: how to change GetVariable("tdcreate") to date format

03-11-2012 11:35 PM in reply to: Amrit.shr

 

Something to play with :

 

http://www.theswamp.org/index.php?topic=41190.msg463478#msg463478

 

tdcreate.PNG

//-------------------------------------------------------

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

Contributor
Amrit.shr
Posts: 13
Registered: ‎03-14-2011
Message 5 of 6 (584 Views)

Re: how to change GetVariable("tdcreate") to date format

03-12-2012 04:39 AM in reply to: KerryBrown

yes. this is it.

 

thanks

Active Contributor
thenndral
Posts: 48
Registered: ‎04-01-2013
Message 6 of 6 (190 Views)

Re: how to change GetVariable("tdcreate") to date format

04-10-2014 07:20 PM in reply to: Amrit.shr

Hi,

 

Thanks for awesome code.

 

Could you help me how to get time upto milliseconds.

 

In your example 03/12/2012 16:25:07:046.

 

How can I get milliseconds?

 

Thanks in advance,

thenndral

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.