Pulling a date from MySQL DB
#7

You can do

Код:
SELECT CONVERT(varchar, REGDATE, 1) FROM ... WHERE ...
where varchar is the target datatype (string), REGDATE is the date you want to convert (the column from your table) and 1 is the format.

https://www.mssqltips.com/sqlservert...ng-sql-server/

There's a table with all the available format IDs, so if you want (for example) MM/DD/YY you can choose format 10.

The result will be one string (the date) which you can get from the cache like any other string (cache_get_value_string or similar).
Reply


Messages In This Thread
Pulling a date from MySQL DB - by Jing_Chan - 06.08.2018, 13:11
Re: Pulling a date from MySQL DB - by Jing_Chan - 06.08.2018, 21:55
Re: Pulling a date from MySQL DB - by NeXTGoD - 06.08.2018, 22:39
Re: Pulling a date from MySQL DB - by Banditul18 - 06.08.2018, 23:00
Re: Pulling a date from MySQL DB - by Calisthenics - 07.08.2018, 08:35
Re: Pulling a date from MySQL DB - by Jing_Chan - 07.08.2018, 11:10
Re: Pulling a date from MySQL DB - by NaS - 07.08.2018, 12:32
Re: Pulling a date from MySQL DB - by Calisthenics - 07.08.2018, 13:19
Re: Pulling a date from MySQL DB - by Jing_Chan - 07.08.2018, 13:22
Re: Pulling a date from MySQL DB - by NaS - 07.08.2018, 14:13

Forum Jump:


Users browsing this thread: 2 Guest(s)