.NET

.NET

Reply
Contributor
13 Posts
0 Kudos
Registered: ‎03-14-2011
Post 1 of 6
Accepted Solution

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

642 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
278 Posts
22 Kudos
Registered: ‎11-29-2008
Post 2 of 6

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*
1,274 Posts
108 Kudos
Registered: ‎03-13-2008
Post 3 of 6

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
278 Posts
22 Kudos
Registered: ‎11-29-2008
Post 4 of 6

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
13 Posts
0 Kudos
Registered: ‎03-14-2011
Post 5 of 6

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
48 Posts
1 Kudo
Registered: ‎04-01-2013
Post 6 of 6

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