Technical Forum

SIMATIC WinCC flexible

WinCC Flex datetime format SQL dd/mm/yyyy instead of mm/dd/yyyy

Thread Starter: Dilli   Started: 11/22/2010 7:56 PM   Replies: 2

« Previous thread Next thread »
Page 1 of 1 (3 items)
  11/22/2010, 7:56 PM
Joined 2/2/2010
Last visit: 7/25/2014
Posts: 119
Rating:
Rated: Very Good [2 out of 5 / rated 1 time(s)]. (1) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi to all here !
Need some help, I want to log some data into SQL data base, i'm using  functions described here
http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&objId=24248681&load=treecontent&lang=en&siteid=cseus&aktprim=0&objaction=csview&extranet=standard&viewreg=WW
 One of row is datetime format, and I get the current time with function now(), the SQL, as i know, works only with mm/dd/yyyy, but my Regional Settings is configured to show the date dd/mm/yyyy and i don't want to change it, is it possible to convert the result of function now() to return mm/dd/yyyy despite my configuration ?
Top
  11/23/2010, 2:18 PM
Joined 10/20/2005
Last visit: 6/21/2012
Posts: 9
Rating:
Rated: Excellent [5 out of 5 / rated 1 time(s)]. (1) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

Why not format your own date?




=== Edited by RamonT @ 11/23/2010 2:19 PM [GMT ] ===


Top
  11/23/2010, 2:37 PM
Joined 2/2/2010
Last visit: 7/25/2014
Posts: 119
Rating:
Rated: Very Good [2 out of 5 / rated 1 time(s)]. (1) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
thanks RamonT, i've added the time and it works 
MyDate = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now()) & " " & Hour(Now()) & ":" & Minute(Now())& ":" & Second(Now())
Top
Thank you for this post from:
Page 1 of 1 (3 items)
Actions