on 04-13-2010 2:28 PM
Hello All,
i want to create a query from the OCRD Database.
the create Date format is DD/MM/YYYY actually. is it possible to get it back in YYYYMMDD?
i tried allready the FORMAT and TO_CHAR function but it didn't work in the SQL Statemant??
Thank you and best regards
Serkan
Hello Serkan,
You may use Cast or Convert to do the job. Convert is the simplest way such as: Convert(varchar(8), GetDate(), 112).
If you need query result for DTW upload, better changing date format under Excel. That would be much easier.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will need to use a CONVERT statement, and select the number code which has the right format for you. You can get this from the SQL help files.
example: CONVERT(varchar, T0.DocDate, 112)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.