Announcement

Collapse
No announcement yet.

Date and time validation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date and time validation

    How to validation date and time entered from qwerty keyboard (ascii array)? Thank you.

    Code:
    var dateBuffer[11];
    var timeBuffer[9];
    
    func isValidDate(var asciiArray)
    
    endfunc
    
    func isValidTime(var asciiArray)
    
    endfunc
    
    func main()
        gfx_ScreenMode(LANDSCAPE);
        to(dateBuffer); print("31/12/2015"); // dd/MM/yyyy
        print(isValidDate(dateBuffer));
    
        to(dateBuffer); print("08:10:01"); // HH:mm:ss
        print(isValidTime(dateBuffer));
    endfunc
Working...
X