Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-01-2012, 10:59 AM
mptorney mptorney is online now
Registered User
 
Join Date: 03-28-2011
Posts: 1
Get the month from vbld_FormatDateEx

I'm in the UK, so my date format has the day first, so today (Feb 1st) is written as 01/02/2012. When I use vbld_FormatDateEx to get the month back, I don't get the correct result. For example, if

COMMITDATE = 01/02/2012 16:29:42

and I call [vbld_FormatDateEx("%COMMITDATE%", "mm")]

the result is 01, not 02. I though I could get around this by using "dd", which returns the correct result for the first 12 days of the month (while there is an ambiguity, I guess), and the actual day for the rest of the month.

Am I missing something? Can I force the date format that's used? Or should I just parse COMMITDATE myself?
Reply With Quote
  #2  
Old 02-01-2012, 03:09 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,790
Currently, Visual Build always uses US English locale for the script engine, so conversion of a string to a date in script code will parse with US English formatting. In the future, we will provide a way to use the current locale for script code, but for now you would need to parse the month out manually. One way would be:
Code:
[Split("%COMMITDATE%", "/")(1)]
Reply With Quote
  #3  
Old 02-24-2012, 08:21 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,790
This is supported in v8.0.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 10:03 PM.


Copyright 1999-2021 Kinook Software, Inc.