Jump to content
Developer Wiki and Function Reference Links ×

DATE(2,0) output WIN10 vs MAC Sierra??


LarryO

Recommended Posts

I have been using the DATE(2,0) procedure to capture the current date for our custom titleblock.

What I've found after rewriting some clumsy code for our WIN10 machine that I'd originally wrote on the Mac platform is that the format delivered is reversed between the two platforms. The Mac outputs D/M/YYYY and the PC supplies YYYY/M/D. Very frustrating indeed! The Mac system option is set to display the short form day as YYYY/MM/DD as this is the desired format.

Has anyone explored whether this format is set by the user at the operating system level or is it a static difference between PC and MAC platforms? [a bug? in the Date(#,#); procedure]

VW2013

Link to comment

Date() pulls from the system date format, which can vary with system and region settings. Your best solution is to use the date functions inherent in Python, which are a lot more granular and reliable. 

 

If your script is simple, converting over isn't bad, or you can call Python within VS to deal with the date. 

 

-Josh

Link to comment

Having never been exposed to Python it didn't seem like the obvious answer to me. (OLD school here: BasicPlus, APL, Pascal, C++, Vectorscript)

 

None the less I spent 20 minutes searching for how to call up Python within the 2013 version of Vectorscript on Mac and found NIL, nothing and frustration.

In the end I wrote another eight lines of code and added three variables into my Plugin to organise the output of the two platforms separately.

Sorting the two outputs into a standardized format of YYYY/MM/DD, no dashes, no single digit days or months.

 

But I did appreciate the reply, thanks Josh.

Larry

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...