Scjordo Posted May 4, 2020 Share Posted May 4, 2020 1. UPDATE Advised_Students (in SchoolScheduling DB) for YOUR StudLastName and change your StudentID to your birthdate in the format of MMDDYY. For example, if you were born Feb 2 1985 the value would be 020285. Since this field is an integer, the leading zero will not be included in the updated value. Link to comment Share on other sites More sharing options...
shaili_shah Posted July 3, 2020 Share Posted July 3, 2020 Use CONVERT function to change the datatype. SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY] I hope it'll be helpful. Thanks! Link to comment Share on other sites More sharing options...
dsonesuk Posted July 3, 2020 Share Posted July 3, 2020 So student id could be 2 lengths for those that do not include a leading zero, and those that do?. what happens if students have same birthdates? For sorting correctly wouldn't be better to have format of yyyymmdd, as mm, and dd will be multiple to month's and years, year will be singular, which then make mm and dd singular to that specific year. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now