Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-25-2007, 05:19 PM
Too_Tall_Crown_Victoria Too_Tall_Crown_Victoria is online now
Registered User
 
Join Date: 01-15-2003
Posts: 44
Using vbld_FormatDateEx

Can you provide a sample script that uses this function and returns the value in the following format?

vbld_FormatDateEx(%DATE%, "yyyy-mm-dd")


Also how can I get the format for yesterday and for 7 days ago?

Thanks

Tom
Reply With Quote
  #2  
Old 07-25-2007, 05:51 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Attached.
Attached Files
File Type: bld dates.bld (462 Bytes, 1879 views)
Reply With Quote
  #3  
Old 07-25-2007, 05:56 PM
Too_Tall_Crown_Victoria Too_Tall_Crown_Victoria is online now
Registered User
 
Join Date: 01-15-2003
Posts: 44
Can I use [vbld_FormatDateEx(Now, "yyyy-mm-dd")] in a set macro directly or does it have to be set via some script?

Also I am getting " 'Now' is undefined" when using your script.

Tom
Reply With Quote
  #4  
Old 07-25-2007, 05:58 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Quote:
Originally posted by Too_Tall_Crown_Victoria
Can I use [vbld_FormatDateEx(Now, "yyyy-mm-dd")] in a set macro directly
Yes.

Quote:
Also I am getting " 'Now' is undefined" when using your script.
Is VBScript your default script language (Tools | Application Options | General)? Please ZIP and send or post:
1) The info from Help | About | Install Info
2) The .bld file
3) A build log file

Thanks.
Reply With Quote
  #5  
Old 07-25-2007, 08:17 PM
Too_Tall_Crown_Victoria Too_Tall_Crown_Victoria is online now
Registered User
 
Join Date: 01-15-2003
Posts: 44
My App is set to use JScript since I have a bunch of global JScripts that I use.

I have also figured out how to solve my problem.

What I still don't understand is how to use your vbld_FormatDateEx in a JScript Script action or a Set Macro step.

Thanks

Tom
Reply With Quote
  #6  
Old 07-25-2007, 09:57 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Neither Now nor the vbld_FormatDateEx system script function are available to JScript.

One option would be to add a Run Script (VBScript) step. To create/update a macro from such a step, you could use something like:

Application.Macros(vbldMacroTemporary).Add "NAME", vbld_FormatDateEx(Now, "yyyy-mm-dd")
Reply With Quote
Reply


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 08:02 PM.


Copyright © 1999-2023 Kinook Software, Inc.