Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime values
Message
From
19/08/2011 07:01:06
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01521321
Message ID:
01521323
Views:
32
>>Hi
>>
>>I'm processing some csv files and I want to move the processed file to another location and rename it with a datetime string
>>
>>yyymmddhhmmss
>>
>>anyone know the easiest way to return that string from GETDATE()
>>
>>Thanks
>>
>>Nick
>
>CAST(REPLACE(REPLACE(REPLACE(convert(CHAR(19),GETDATE(),126 ),'-',''),'T',''),':','') AS CHAR(14))
>
>MartinaJ

Thanks Martina
Previous
Reply
Map
View

Click here to load this message in the networking platform