General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2005
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only