Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Format function in VB.net SSIS script Expand / Collapse
Author
Message
Posted Tuesday, December 23, 2008 8:40 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, February 11, 2011 7:01 AM
Points: 91, Visits: 198
I was wondering if we culd generate date in yyyymmddhhnnss format
in vb.net. However there is already a function vb
Format(Now(), "YYYYMMDDhhnnss") which does not work in SSIS script.

So, do we have an alternative to this?

Post #624741
Posted Tuesday, December 23, 2008 10:12 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:26 AM
Points: 10,381, Visits: 13,436
In .NET the preferred way to handle this is to use the ToSTring function with a Format specified. Like this:

Now.ToString("yyyyMMddhhmmss")





Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #624840
Posted Wednesday, December 24, 2008 3:54 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, February 11, 2011 7:01 AM
Points: 91, Visits: 198
Many Thanks.............

Post #625267
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse