The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Function Format (like in VB6) ???
Posted: 10 Jun 11 1:18 PM
|
fiogf49gjkf0d Hello guys!
Im having a problem to compare 2 dates, because slx convert for the US Date (Ex: 04/20/2011), and i use the British format (Ex: 20/04/2011)..
Someone know a function to convert this? American to British in slx?
thanks!
Rafael |
|
|
|
Re: Function Format (like in VB6) ???
Posted: 10 Jun 11 1:43 PM
|
fiogf49gjkf0d Well.....don't confuse Display text with Serial Dates Time values.....the value stored in the database is correct.....and the value displayed is based on how you format it.....
What is the Region Short Date format for your MACHINE?
How are you displaying the data to the user? how are You converting from UDT to the wrong format? |
|
|
|
Re: Function Format (like in VB6) ???
Posted: 10 Jun 11 1:46 PM
|
fiogf49gjkf0d RJ Samp,
My shot date is in British format... and im not formatting the string... im trying to fill a datagrid and when a compare 2 dates, one is in british format, other in american.. |
|
|
|
Re: Function Format (like in VB6) ???
Posted: 10 Jun 11 2:22 PM
|
fiogf49gjkf0d Rafael:
As per RJ's response, a Date value is a Date value.
It seems as if you are comparing two String representations of Dates.
What you need to do is try to obtain the Actual DateTime, and make sure that you work with Date or Doubles
Use CDate() or CDbl() as necessary to handle your date values and variables accordingly.
|
|
|
|
Re: Function Format (like in VB6) ???
Posted: 10 Jun 11 2:25 PM
|
fiogf49gjkf0d Raul, RJ
Thanks for the answer.... i will try that...
but just to know: dont have a format function like format(date, "dd/mm/yyyy") huh?
thanks again! |
|
|
|
Re: Function Format (like in VB6) ???
Posted: 10 Jun 11 2:33 PM
|
fiogf49gjkf0d If there was a Format function, it would be part of VB, not SLX.
But based on your complaint (comparing dates), you should focus on getting the Actual Values for the Dates rather than the Display.
When you work with Grids, if you assign a Date Value to the Recordset, the grid will then display it based on the Format chosen (and then you may be able to specify a Formatting string to override the default formatting which is based on your Machine Regional Settings).
|
|
|
|