Link to home
Start Free TrialLog in
Avatar of 25112
25112

asked on

changing format of getdate to include yyy-mon-....

how can you change the normal getdate() to the a format like:
2014Aug1808301403394

specifically, how to change 08 to Aug like in the above example and how to more precision beyond millisecond?

this is for sql 2012

thanks
SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 25112
25112

ASKER

thanks - we are getting close.
 
    Select format(sysdatetime() ,'yyyy MMM dd HH mm ss FFFFFFF')
  Select format(GETDATE() ,'yyyy MMM dd HH mm ss FFFFFFF')
  gives
2014 Sep 16 09 46 43 7699724
2014 Sep 16 09 46 43 767 (4 precision less than the above)

what we need is ( without the 2 extra digits with sysdatetime)
2014 Sep 16 09 46 43 767__
Avatar of 25112

ASKER

sorry- I do see it now.


   Select format(sysdatetime() ,'yyyy MMM dd HH mm ss FFFFF')

thanks all.